www.pudn.com > mat_lib.zip > READ.ME


     HEADER:   CUG___._; 
      TITLE:   Matrix library; 
       DATE:   4/09/1989; 
DESCRIPTION:   "Series of macros and functions which accomodate dynamic 
               declaration of arrays on heap. Functions provide 
               declaration, access, and various operations on both float 
               and string arrays. Float array operations are row and 
               column sums, moving averages, cumulative totals, 
               determinants, cofactor, inverse, transpose, solution, 
               etc. Token arrays may be input and output from commented 
               textfiles. Other functions transfer token and float 
               elements between the two types of arrays. Maximum array 
               size is 64k."; 
    VERSION:   2.04; 
   KEYWORDS:   heap,array,textfile,i/o,error,float,token,allocation,matrix, 
               mathematics; 
   FILENAME:   MAT_V2D.H; 
     SYSTEM:   MS-DOS; 
    AUTHORS:   John J. Hughes; 
  COMPILERS:   Turbo C; 
 
 
                        CONTENTS OF README FILES 
                        ------------------------ 
 
                                                         LINE NO. 
 
INTRODUCTION TO MAT_LIB  .................................  46 
 
DESCRIPTION OF MAT_LIB HEADER AND OBJECT FILES ...........  70 
 
ABBREVIATED MAT_LIB DOCUMENTATION ........................  90 
 
SETUP TEST FILES ......................................... 106 
 
MAT_LIB SAMPLE PROGRAM AND DATA FILES .................... 133 
 
AVAILABILITY OF FULL DOCUMENTATION AND SOURCE CODE ....... 162 
 
FUTURE DEVELOPMENT ....................................... 174 
 
USER REGISTRATION ........................................ 195 
 
 
 
                         INTRODUCTION TO MAT_LIB   
 
MAT_LIB is a series of approximately 50 C Language functions and macros  
which input and output tabular data being maintained in ASCII textfiles.  
While the tabular data is in RAM, it is stored in dynamically allocated  
token or floating point arrays on the heap. 
 
Functions are provided to examine an ASCII textfile to determine the  
number of rows, columns, and token size of the textfile's tabular data.  
Other C language macros provide the ability to dimension either a  
floating point or string token array large enough to hold the ASCII  
textfile's data. Once in memory, floating point array matrix operations  
can be performed on the data. Token array data can be converted to and  
from float or integer values. Floating point arrays which have been  
modified by calculations can be merged into token arrays for output or  
they can be output to a textfile directly. The output textfiles can, in  
turn used as the input for a later applications programs founded on  
MAT_LIB textfile formats. The data format is simply a tabular textfile  
with comments enclosed in curly braces. Column headings can be provided  
in braces as comments or they can be read as data into token arrays.  
 
 
 
             DESCRIPTION OF MAT_LIB HEADER AND OBJECT FILES 
  
 
All of the files on this disk are released to the public domain. The  
MAT_LIB functions are provided as Borland Turbo C library files.  
MAT_SN.LIB is a small memory model library and MAT_MN is a medium memory  
model library. The header file containing prototypes and macros used in  
library is MAT_V2D.H. These library files were compiled from copyrighted  
source code which is not released to the public domain. Information on  
obtaining full MAT_LIB library documentation and source code is found  
later in this READ.ME file.  
 
Since the source code is available for a nominal fee, users must bear 
full responsibility for verifying the code's correctness and adequacy 
for any particular application.  The author disclaims any responsibility 
for errors and omissions in the source code and for any damages 
resulting from those errors and omissions. 
 
 
 
                    ABBREVIATED MAT_LIB DOCUMENTATION  
 
 
Brief descriptions of each of the MAT_LIB functions and macros and their  
ANSI C prototype headers are found in the file MAT_V2D.ABR. By the way,  
the _V2D part of filename indicates the version number of the files on  
this disk. It is version 2.04.  
 
The full docmentation package contains complete function and macro  
descriptions arranged alphabetically in the same format used in Borlands  
Turbos C docmentation. That package also has cross-references to the  
source code, example source code for all functions, expanded error  
message coverage, and a source code listing. The manual also has  
sections describing library useage. 
 
 
                            SETUP TEST FILES  
 
 
Two programs used to test the MAT_LIB functions are also included on  
this disk. They provide examples of each of the MAT_LIB functions and  
macros.  
 
TEST_TK.PRJ and TTST_V2D.C create a program which exercises each  
of the token array capabilities. The following data files are needed for  
execution: 
 
 
                    MISC.DTA    NUMS.DTA    A.DTA 
 
 
TEST_FLT.PRJ and FTST_V2D.C create a program which exercises each  
of the float array capabilities. The following data files are needed for  
execution: 
 
             A.DTA    B.DTA    C.DTA    BIG.DTA     WIDE.DTA 
 
 
Examination and execution of the above programs should provide the  
reader with a good feel for the library capabilities.  
 
 
 
                  MAT_LIB SAMPLE PROGRAM AND DATA FILES  
 
 
There are three sample programs included on this disk.  
 
BOLT.C is a very short simple program which demostates the power of  
MAT_LIBs basic file reading and writing functions, and dynamic array  
dimensioning. The project make file is BOLT.PRJ and sample input data is  
included in BOLT.INP. BOLT.DOC describes the operation of the program. 
 
CONTOUR.C ia a program which plots contour lines using ASCII characters.  
The make file is CONTOUR.PRJ and sample data is included in CONTOUR.INP. 
A more detailed description of the program is included in CONTOUR.DOC. 
(Note: The output routines could be readily modified to plot using the  
Borland graphics functions.)  
 
The last sample program, ECON_PLT.C is program which plots business data  
in the form of "z-charts", which are useful in forcasting data trends.  
This program uses calls to several Quin-Curtis scientific and  
engineering functions to perform the actual line plotting. Since the Q-C  
functions are proprietary, neither the source or object code is provided  
but ECON_PLT.EXE is provided. Examination of ECON_PLT.C should be  
educational. The program demonstrates that the MAT_LIB functions and  
dynamic arrays are compatible with 3rd party array handling funcitions. 
Three data files of business data, BUSN-1.DAT, BUSN-2.DAT, and  
BUSN-3.DAT are provided and ECON_PLT.DOC provides a complete description  
of the program. 
 
 
           AVAILABILITY OF FULL DOCUMENTATION AND SOURCE CODE  
 
 
Full documentation including complete function descriptions in the  
Borland format complete with examples of each function, expanded error  
message description and how to best take advantage of the library's  
capabilities can be purchased for $20.00. A 5 1/4 inch disk containing  
complete source code for the MAT_LIB functions is also available for  
$20.00. The users manual and the disk may be purchased together for  
$35.00. To order please fill out a copy of the ORDER.FRM file.  
 
 
                         FUTURE DEVELOPMENT WORK 
 
 
The library will be mmodified to use huge pointers so that all available  
memory can used in a single large array. The current version can access  
up to 64k of total array memory.  Registered users will be advised of  
its availability. 
 
Other future developments will be of a more specialized nature directed  
towards engineering analysis work. A companion package of generalized  
finite element analysis functions (selected element matrices, global  
matrix assemblly, and solution using virtual memory and banded matrix  
storage) and a graphics interface for Autocad's DXF files are planned.  
The intent of both packages is to support the needs of a practicing  
engineer in automating the production of drawings by linking analysis  
programs to PC CAD programs. The results of this work will be offered as  
reasonably priced C language source code packages similiar to the  
MAT_LIB offer. Please note your interest in these developments on the  
registration form if you wish to be advised of their availability.  
 
 
                            USER REGISTRATION  
 
 
Users are encouraged to register using a copy of REGISTER.FRM and to  
advise the author of any errors or omissions found in the source code.  
 
Since the source code is available for a nominal fee, users must bear 
full responsibility for verifying the code's correctness and adequacy 
for any particular application.  The author disclaims any responsibility 
for errors and omissions in the source code and for any damages 
resulting from those errors and omissions. The library has been used for  
about a year and although occasional bugs are still being uncovered, the  
code is fairly stable. 
 
The header file and any object or executable images (i.e. *.obj, *.exe, 
*.com or *.lib files) compiled from the source code for functions 
prototyped in the MAT_V2D.H header file may be releasesed to the public  
domain. The C language source code for the functions prototyped in the  
header file is copyrighted.   
 
 
NOTE ON COMPILING SOURCE CODE: The Borland Warning message "Code has  
no effect" can be safely diregarded.