table_io
table_io,
a Python code 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:
The computer code and data files described and made available on this web page
are distributed under
the MIT license
Languages:
table_io is available in
a C version and
a C++ version and
a FORTRAN90 version and
a MATLAB version and
a Python version.
Related Data and Programs:
TABLE,
a format which
is used for the files input or output by the TABLE_IO code.
Source Code:
-
file_column_count.py,
returns the number of columns (words) in typical line of a file.
-
file_row_count.py,
returns the number of rows (lines) in a file.
-
i4_log_10.py,
returns the integer part of the logarithm, base 10, of an I4.
-
i4mat_data_read.py,
reads the data (values) of an I4MAT file.
-
i4mat_header_read.py,
reads the header (sizes) of an I4MAT file.
-
i4mat_indicator.py,
returns an indicator I4MAT.
-
i4mat_print.py,
prints an I4MAT.
-
i4mat_print_some.py,
prints some of an I4MAT.
-
i4mat_write.py,
writes an I4MAT to a file.
-
i4vec_data_read.py,
reads the data (values) of an I4VEC file.
-
i4vec_header_read.py,
reads the header (sizes) of an I4VEC file.
-
i4vec_print.py,
prints an I4VEC.
-
i4vec_write.py,
writes an I4VEC to a file.
-
r8mat_data_read.py,
reads the data (values) of an R8MAT file.
-
r8mat_header_read.py,
reads the header (sizes) of an R8MAT file.
-
r8mat_indicator.py,
returns an indicator R8MAT.
-
r8mat_print.py,
prints an R8MAT.
-
r8mat_print_some.py,
prints some of an R8MAT.
-
r8mat_transpose_write.py,
writes the transpose of an R8MAT to a file.
-
r8mat_write.py,
writes an R8MAT to a file.
-
r8vec_data_read.py,
reads the data (values) of an R8VEC file.
-
r8vec_header_read.py,
reads the header (sizes) of an R8VEC file.
-
r8vec_print.py,
prints an R8VEC.
-
r8vec_write.py,
writes an R8VEC to a file.
-
r8vec2_data_read.py,
reads the data (values) of an R8VEC2 file.
-
r8vec2_header_read.py,
reads the header (sizes) of an R8VEC2 file.
-
r8vec2_print.py,
prints an R8VEC2.
-
r8vec2_write.py,
writes an R8VEC2 to a file.
-
timestamp.py,
prints the current YMDHMS date as a timestamp.
Last revised on 22 June 2020.