TABLE_IO\
Table Files\
Read and Write Utilities {#table_io-table-files-read-and-write-utilities align=”center”}
========================
TABLE_IO is a C++ library which can read or write 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
R8MAT_WRITE. A typical read operation will probably first want to
call R8MAT_HEADER_READ to determine the values of M and N,
and then allocate space for the table, and then call R8MAT_DATA_READ
to read the data.
Licensing: {#licensing align=”center”}
The computer code and data files described and made available on this
web page are distributed under the GNU LGPL
license.
Languages: {#languages align=”center”}
TABLE_IO is available in a C
version and a C++
version and a FORTRAN77
version and a FORTRAN90
version and a MATLAB
version and a Python
version and
TABLE, a file format which is used for
the storage of table files.
TABLE_BORDER, a C++
program which can read a TABLE file and add zero entries corresponding
to a single layer of boundary data.
TABLE_DELAUNAY, a
C++ program which reads a file of 2d point coordinates and computes the
Delaunay triangulation.
TABLE_LATINIZE, a
C++ program which can read a TABLE file and write out a “latinized”
version.
TABLE_QUALITY, a C++
program which can read a TABLE file and print out measures of the
quality of dispersion of the points.
TABLE_UNBORDER, a
C++ program which can be used to remove the border from a table file.
TABLE_VORONOI, a C++
program which reads a TABLE file describing a set of 2D points, and
print out information describing the Voronoi diagram of those points.
Source Code: {#source-code align=”center”}
Examples and Tests: {#examples-and-tests align=”center”}
List of Routines: {#list-of-routines align=”center”}
- CH_CAP capitalizes a single character.
- CH_EQI is true if two characters are equal, disregarding case.
- CH_TO_DIGIT returns the integer value of a base 10 digit.
- FILE_COLUMN_COUNT counts the 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
ABS(X).
- I4_MAX returns the maximum of two I4’s.
- I4_MIN returns the minimum of two I4’s.
- I4MAT_BORDER_ADD adds a “border” to an I4MAT.
- I4MAT_BORDER_CUT cuts the “border” of an I4MAT.
- I4MAT_DATA_READ reads data from an I4MAT file.
- I4MAT_HEADER_READ reads the header from an I4MAT file.
- I4MAT_INDICATOR_NEW sets up an “indicator” I4MAT.
- I4MAT_PRINT prints an I4MAT, with an optional title.
- I4MAT_PRINT_SOME prints some of an I4MAT.
- I4MAT_READ reads the information from an I4MAT file.
- I4MAT_WRITE writes an I4MAT file with no header.
- I4VEC_DATA_READ reads data from an I4VEC file.
- I4VEC_DATA_READ_NEW reads data from an I4VEC file.
- I4VEC_WRITE writes an I4VEC to a file.
- L4VEC_DATA_READ_NEW reads data from an L4VEC file.
- L4VEC_HEADER_READ reads the header from an L4VEC file.
- L4VEC_WRITE writes an L4VEC to a file.
- R4MAT_DATA_READ reads the data from an R4MAT file.
- R4MAT_HEADER_READ reads the header from an R4MAT file.
- R4MAT_INDICATOR_NEW sets up an “indicator” R4MAT.
- R4MAT_PRINT prints an R4MAT, with an optional title.
- R4MAT_PRINT_SOME prints some of an R4MAT.
- R4MAT_READ reads information from an R4MAT file.
- R4MAT_TRANSPOSE_PRINT prints an R4MAT, transposed.
- R4MAT_TRANSPOSE_PRINT_SOME prints some of an R4MAT,
transposed.
- R4MAT_UNIFORM_01 returns a unit pseudorandom R4MAT.
- R4MAT_WRITE writes an R4MAT file.
- R8MAT_BORDER_ADD adds a “border” to an R8MAT.
- R8MAT_BORDER_CUT cuts the “border” of an R8MAT.
- R8MAT_DATA_READ reads the data from an R8MAT file.
- R8MAT_HEADER_READ reads the header from an R8MAT file.
- R8MAT_INDICATOR_NEW sets up an “indicator” R8MAT.
- R8MAT_PRINT prints an R8MAT, with an optional title.
- R8MAT_PRINT_SOME prints some of an R8MAT.
- R8MAT_READ reads information from an R8MAT file.
- 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.
- R8MAT_WRITE writes an R8MAT file.
- R8VEC_DATA_READ reads the data from an R8VEC file.
- R8VEC_DATA_READ_NEW reads the data from an R8VEC file.
- R8VEC_HEADER_READ reads the header from an R8VEC file.
- R8VEC_WRITE writes an R8VEC file.
- R8VEC2_WRITE writes an R8VEC2 file.
- 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_L4 reads an L4 from a string.
- S_TO_R4 reads an R4 from a string.
- S_TO_R4VEC reads an R4VEC from a string.
- S_TO_R8 reads an R8 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.
You can go up one level to the C++ source codes.
Last revised on 17 July 2014.