Last change
2/5/08: Tiny change in ReadArg()when reading a boolean.
Latest version: oxutils.zip. See also
change log.
OxUtils
In the course of the several years, it became convenient for me to have
some routines at hand which execute common tasks in
Ox for me.
Creating graphs, tables, checking the time a program lasts, or also the profiling
of a program to find out where all the time was spent, became tasks
for which I created libraries or simple include-files.
The graphics routines are combined into the package GnuDraw, with a description in separate pages.
The OxUtils package contains the following routines:
- info
A small routine which prints information on the screen concerning
the remaining time a program is expected to run
- lockfile
A routine which can be used to lock a file while Ox is performing
computations on it, to make sure that a second instance of Ox is
not using the same file
- PrintMatrix
and printtex/fprinttex
Print a matrix in a LaTeX table format, including the '&'s, with
longer lines allowed.
Several generalizations included in the present
version of this routine are programmed by
Patrick
Houweling. The printtex
statement is meant to work as a drop-in replacement for the standard Ox
print statement. Phillip Gould mentioned the use of having a
fprinttex version as well.
- ReadArg
A routine for quickly checking if a certain command line parameter
was given along when starting Ox.
- loadtab
and savetab
Save a table, i.e. a matrix with row and column labels. If an older
table of the same name exists, the table can be appended to, joining
rows or columns if they have the same name.
- SetSeed
Set the random seed to a number based on the current time, which is
more random than the standard start-up value of the seed
- TrackTime
A set of routines which help in profiling a program, to find out
which routine should be speeded up first.
- size
A terribly simple routine which I find myself using all the time, to return at
once both the number of rows and columns of a matrix.
The use of these routines is most easily appreciated by reading through
the page with examples, or checking out
the manual and the
example ox-files mentioned there.
To install the package,
Oxutils change log
Below a list of the changes in Oxutils. The latest version is available
as oxutils.zip.
- 2/5/08
- Tiny change in ReadArg()when reading a boolean.
- 11/2/08
- Finetuned printing strings in printtex().
- 3/10/06
- Added option to ReadArg()
to read an array of strings.
- 12/9/06
- Updated the manual on TrackTime().
- 9/5/06
- Introduced ReadArgUsed()
to get an overview of the commandline arguments read in your program.
- 10/10/2005
- Added fprinttex,
generalised the ReadArg
command, and added the loadtab/
savetab commands.
- 02/02/2005
- Added support for printing parentheses in format string, see example
in extable.ox
- 05/01/2005
- Added internal references to acfisq, and included it in the
reference.