Last change11/2/14: Updated ReadArg to allow specifying possible inputs, e.g. if a vector of numbers below 10 should be given on the command line.
OxUtilsIn 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:
A small routine which prints information on the screen concerning the remaining time a program is expected to run
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
Print a matrix in a LaTeX table format, including the '&'s, with longer lines allowed.
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.
A routine for quickly checking if a certain command line parameter was given along when starting Ox.
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.
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
A set of routines which help in profiling a program, to find out which routine should be speeded up first.
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.
- download oxutils.zip and unzip this file from
your Ox folder (using folder names). This creates files in the
directory <ox-home>/packages/oxutils. In this case, no change of the
OX7PATH environment variable is needed.
Installation in a local directory is also possible; e.g. if you install under Windows in c:\myox, resulting in files in
c:\myox\packages\oxutilsthen make sure that the directory c:\myox is included in the OX7PATH variable.
- Option A:
Put the file <ox-home>/packages/oxutils/doc/oxutils.html in your list of bookmarks, or, better even,
Edit <ox-home>/doc/oxmenu.html, adding a line
<tr><td><a href="../packages/oxutils/doc/oxutils.html">OxUtils reference</a></td></tr>before the line referring to the Predefined constants such that the documentation is available from the standard Ox documentation.
Oxutils change logBelow a list of the changes in Oxutils. The latest version is available as oxutils.zip.
- Updated ReadArg to allow specifying possible inputs, e.g. if a vector of numbers below 10 should be given on the command line.
- Updated ReadArg to react more logically to its arguments; return value now indicates number of elements correctly read, or a TRUE if a boolean was found.
- Corrected small bug in printtex concerning missings in the first column of a matrix.
- Simplified example files, got rid of a small bug in printcsv.
- Tiny change in ReadArg()when reading a boolean.
- Finetuned printing strings in printtex().
- Added option to ReadArg() to read an array of strings.
- Updated the manual on TrackTime().
- Introduced ReadArgUsed() to get an overview of the commandline arguments read in your program.
- Added fprinttex,
generalised the ReadArg
command, and added the loadtab/
- Added support for printing parentheses in format string, see example in extable.ox
- Added internal references to acfisq, and included it in the reference.