TABLE_IO
Table Files
Read and Write Utilities
TABLE_IO is a C library
which reads or writes a TABLE file.
A
TABLE file is a simple format for storing a double-indexed
array of data. We regard this is a situation involving N
points in M dimensions, with M relatively small
(often just 2 or 3, but possibly 10 or 20) while N can
be "enormous" (10, 100, 1,000 or 10,000).
To keep things simple, then, the data is written to an ASCII
file, with optional comment lines (which must start with the
'#' character) and blank lines (which are ignored). The point
data is stored by writing the coordinates of each point on
a separate line. No information about M or N is
explicitly included in the file.
It is up to the I/O program to determine this.
TABLE_IO supplies routines by which a TABLE file can
easily be written or read. A typical write operation simply
calls routine TABLE_WRITE. A typical read operation
will probably first want to call TABLE_HEADER_READ
to determine the values of M and N, and then
allocate space for the table, and then call TABLE_DATA_READ
to read the data.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Related Data and Programs:
TABLE
is a file format used for the storage of table files.
TABLE_BORDER
is a C++ program that can read a TABLE file
and add zero entries corresponding to a single layer of
boundary data.
TABLE_DELAUNAY
is an executable C++ program that reads a
file of 2d point coordinates and computes the Delaunay triangulation.
TABLE_DISCREPANCY
is a C++ program that bounds the star
discrepancy of a point set.
TABLE_IO is available in
a C version and
a C++ version and
a FORTRAN77 version and
a FORTRAN90 version and
a MATLAB version.
TABLE_LATINIZE
is a C++ program that can read a TABLE file
and write out a "latinized" version.
TABLE_QUALITY
is a C++ program that can read a TABLE file
and print out measures of the quality of dispersion of the points.
TABLE_READ
is a MATLAB script that can read in a TABLE file.
TABLE_UNBORDER
is a C++ program can be used to remove the
border from a table file.
TABLE_VORONOI
is a C++ program that can read a TABLE file
describing a set of 2D points, and print out information
describing the Voronoi diagram of those points.
Source Code:
Examples and Tests:
List of Routines:
-
CH_CAP capitalizes a single character.
-
CH_EQI is TRUE (1) if two characters are equal, disregarding case.
-
CH_TO_DIGIT returns the integer value of a base 10 digit.
-
DTABLE_DATA_BORDER_ADD adds a "border" to DTABLE data.
-
DTABLE_DATA_BORDER_CUT cuts the "border" of DTABLE data.
-
DTABLE_DATA_READ reads the data from a DTABLE file.
-
DTABLE_DATA_WRITE writes data to a DTABLE file.
-
DTABLE_HEADER_READ reads the header from a DTABLE file.
-
DTABLE_HEADER_WRITE writes the header of a DTABLE file.
-
DTABLE_READ reads information from a DTABLE file.
-
DTABLE_WRITE writes information to a DTABLE file.
-
FILE_COLUMN_COUNT counts the number of columns in the first line of a file.
-
FILE_ROW_COUNT counts the number of row records in a file.
-
I4_LOG_10 returns the integer part of the logarithm base 10 of an I4.
-
I4_MAX returns the maximum of two I4's.
-
I4_MIN returns the smaller of two I4's.
-
I4_POWER returns the value of I^J.
-
I4MAT_INDICATOR sets up an "indicator" I4MAT.
-
I4MAT_PRINT prints an I4MAT, with an optional title.
-
I4MAT_PRINT_SOME prints some of an I4MAT.
-
ITABLE_DATA_BORDER_ADD adds a "border" to ITABLE data.
-
ITABLE_DATA_BORDER_CUT cuts the "border" of ITABLE data.
-
ITABLE_DATA_READ reads the data from a ITABLE file.
-
ITABLE_DATA_WRITE writes data to an ITABLE file.
-
ITABLE_HEADER_READ reads the header from a ITABLE file.
-
ITABLE_HEADER_WRITE writes the header of an ITABLE file.
-
ITABLE_READ reads information from a ITABLE file.
-
ITABLE_WRITE writes information to an ITABLE file.
-
R8_EPSILON returns the R8 round off unit.
-
R8MAT_INDICATOR sets up an "indicator" R8MAT.
-
R8MAT_PRINT prints an R8MAT, with an optional title.
-
R8MAT_PRINT_SOME prints some of an R8MAT.
-
R8MAT_TRANSPOSE_PRINT prints an R8MAT, transposed.
-
R8MAT_TRANSPOSE_PRINT_SOME prints some of an R8MAT, transposed.
-
R8MAT_UNIFORM_01 returns a unit pseudorandom R8MAT.
-
S_LEN_TRIM returns the length of a string to the last nonblank.
-
S_TO_I4 reads an I4 from a string.
-
S_TO_I4VEC reads an I4VEC from a string.
-
S_TO_R8 reads an R8 value from a string.
-
S_TO_R8VEC reads an R8VEC from a string.
-
S_WORD_COUNT counts the number of "words" in a string.
-
TIMESTAMP prints the current YMDHMS date as a time stamp.
-
TIMESTRING returns the current YMDHMS date as a string.
You can go up one level to
the C source codes.
Last revised on 28 May 2008.