@database "amtauto"
@master "Dati:MyLibraries/Matrix/docs/amtauto.doc"

@Node Main "amtauto.doc"
    @{" allocfuncmat() " Link "allocfuncmat()"}
    @{" allocfuncmatcopy() " Link "allocfuncmatcopy()"}
    @{" allocfuncmatmem() " Link "allocfuncmatmem()"}
    @{" allocmat() " Link "allocmat()"}
    @{" allocmatcopy() " Link "allocmatcopy()"}
    @{" allocmatmem() " Link "allocmatmem()"}
    @{" checkdim() " Link "checkdim()"}
    @{" choosematvar() " Link "choosematvar()"}
    @{" CloseKernel() " Link "CloseKernel()"}
    @{" file2matrix() " Link "file2matrix()"}
    @{" freefuncmat() " Link "freefuncmat()"}
    @{" freefuncmatmem() " Link "freefuncmatmem()"}
    @{" freemat() " Link "freemat()"}
    @{" freematmem() " Link "freematmem()"}
    @{" getarray() " Link "getarray()"}
    @{" getdim() " Link "getdim()"}
    @{" getepsilon() " Link "getepsilon()"}
    @{" getformat() " Link "getformat()"}
    @{" getfuncdim() " Link "getfuncdim()"}
    @{" getiterations() " Link "getiterations()"}
    @{" getlastiteration() " Link "getlastiteration()"}
    @{" getmatperid() " Link "getmatperid()"}
    @{" getprecision() " Link "getprecision()"}
    @{" getseed() " Link "getseed()"}
    @{" InitKernel() " Link "InitKernel()"}
    @{" loadmatfunc() " Link "loadmatfunc()"}
    @{" matavl() " Link "matavl()"}
    @{" matcopy() " Link "matcopy()"}
    @{" matcopyrd() " Link "matcopyrd()"}
    @{" mateq() " Link "mateq()"}
    @{" matfunccopy() " Link "matfunccopy()"}
    @{" matfunceq() " Link "matfunceq()"}
    @{" matfuncidn() " Link "matfuncidn()"}
    @{" matfuncnull() " Link "matfuncnull()"}
    @{" matidn() " Link "matidn()"}
    @{" matinp() " Link "matinp()"}
    @{" matinv() " Link "matinv()"}
    @{" matnorm() " Link "matnorm()"}
    @{" matper() " Link "matper()"}
    @{" matpercol() " Link "matpercol()"}
    @{" matplus() " Link "matplus()"}
    @{" matpower() " Link "matpower()"}
    @{" matprint() " Link "matprint()"}
    @{" matrandom() " Link "matrandom()"}
    @{" matrawprint() " Link "matrawprint()"}
    @{" matrowcol() " Link "matrowcol()"}
    @{" matscal() " Link "matscal()"}
    @{" matstd() " Link "matstd()"}
    @{" matsymm() " Link "matsymm()"}
    @{" mattrace() " Link "mattrace()"}
    @{" mattransform() " Link "mattransform()"}
    @{" mattrs() " Link "mattrs()"}
    @{" mattrsrd() " Link "mattrsrd()"}
    @{" matzer() " Link "matzer()"}
    @{" openmatfile() " Link "openmatfile()"}
    @{" printusing() " Link "printusing()"}
    @{" setiterations() " Link "setiterations()"}
    @{" setmatperid() " Link "setmatperid()"}
    @{" setprecision() " Link "setprecision()"}
    @{" setterm() " Link "setterm()"}
    @{" settransform() " Link "settransform()"}
    @{" swap() " Link "swap()"}
    @{" getprecision() " Link "getprecision()"}
@EndNode

@Node "allocfuncmat()" "AMTieee.library/allocfuncmat"

@{b}   NAME@{ub}
	allocfuncmat -- low level vectorial function allocation.

@{b}   SYNOPSIS@{ub}
	success = allocfuncmat( mat )
	DO		        A0
 
	BOOL allocfuncmat( struct matfunc *mat );

@{b}   FUNCTION@{ub}
	Functional Matrix memory allocation, if matrix dimensions are
	already assigned. This function requires you know the matfunc
	structure. In this sense it is a low level function.

@{b}   INPUTS@{ub}
	mat - a statically or dynamically allocated matfunc instance.
	It must have already initialized dimensions.

@{b}   RESULT@{ub}
	success - TRUE if successful, FAlSE otherwise.

@{b}   EXAMPLE@{ub}
	success = allocfuncmat(mat);

@{b}   NOTES@{ub}
	Only functional matrices which have as elements functions
	returning a double value are allowed.
	Note that then you cannot free the matfunc structure, if it was
	statically allocated.

@{b}   DEBUG@{ub}
	Use the macro AllocFuncMat. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
	@{"allocmat()" Link "allocmat()"}, @{"allocmatmem()" Link "allocmatmem()"}, @{"allocmatcopy()" Link "allocmatcopy()"}, @{"freemat()" Link "freemat()"},
	@{"freematmem()" Link "freematmem()"}, @{"allocfuncmatmem()" Link "allocfuncmatmem()"}, @{"allocfuncmatcopy()" Link "allocfuncmatcopy()"},
	@{"freefuncmat()" Link "freefuncmat()"}, @{"freefuncmatmem()" Link "freefuncmatmem()"}.

@EndNode

@Node "allocfuncmatcopy()" "AMTieee.library/allocfuncmatcopy"

@{b}   NAME@{ub}
	allocfuncmatcopy -- allocation of an empty copy of a given
	matrix function.

@{b}   SYNOPSIS@{ub}
	rfmat = allocfuncmatcopy( fmat )
	A0		      A0
 
	struct matfunc *allocfuncmatcopy(struct matfunc *);

@{b}   FUNCTION@{ub}
	This is a more safe procedure than assigning matfunc dimensions.

@{b}   INPUTS@{ub}
	fmat - the pointer of the original matfunc function.

@{b}   RESULT@{ub}
	rfmat = matfunc pointer if successful, NULL otherwise.

@{b}   EXAMPLE@{ub}
	rfmat = allocfuncmatcopy(fmat);

@{b}   NOTES@{ub}
	Nothing.

@{b}   DEBUG@{ub}
	Use the macro AllocFuncMatCopy. Not already active.

@{b}   BUGS@{ub}
	<fmat> must be a valid matrix function pointer.

@{b}   SEE ALSO@{ub}
	@{"allocmat()" Link "allocmat()"}, @{"allocmatmem()" Link "allocmatmem()"}, @{"allocmatcopy()" Link "allocmatcopy()"}, @{"freemat()" Link "freemat()"},
	@{"freematmem()" Link "freematmem()"}, @{"allocfuncmat()" Link "allocfuncmat()"}, @{"allocfuncmatmem()" Link "allocfuncmatmem()"},
	@{"freefuncmat()" Link "freefuncmat()"}, @{"freefuncmatmem()" Link "freefuncmatmem()"}.

@EndNode

@Node "allocfuncmatmem()" "AMTieee.library/allocfuncmatmem"

@{b}   NAME@{ub}
	allocfuncmatmem -- high level vectorial function allocation.

@{b}   SYNOPSIS@{ub}
	fmat = allocfuncmatmem( m, n )
	A0			D0 D1
 
	struct matfunc *allocfuncmatmem( UWORD m, UWORD n );

@{b}   FUNCTION@{ub}
	Functional Matrix memory allocation. You must supply the
	desired dimensions. This function does not require you know
	the matfunc structure. In this sense it is a high level function.
	

@{b}   INPUTS@{ub}
	m - user desired rows in the new functional matrix.
	n - user desired columns in the new functional matrix.

@{b}   RESULT@{ub}
	fmat = matfunc pointer if successful, NULL otherwise.

@{b}   EXAMPLE@{ub}
	mat = allocfuncmatmem(m,n);

@{b}   NOTES@{ub}
	It does not require any knowledge about the matrix structure.
	
@{b}   DEBUG@{ub}
	Use the macro AllocFuncMatMem. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
	@{"allocmat()" Link "allocmat()"}, @{"allocmatmem()" Link "allocmatmem()"}, @{"allocmatcopy()" Link "allocmatcopy()"}, @{"freemat()" Link "freemat()"},
	@{"freematmem()" Link "freematmem()"}, @{"allocfuncmat()" Link "allocfuncmat()"}, @{"allocfuncmatcopy()" Link "allocfuncmatcopy()"},
	@{"freefuncmat()" Link "freefuncmat()"}, @{"freefuncmatmem()" Link "freefuncmatmem()"}.

@EndNode

@Node "allocmat()" "AMTieee.library/allocmat"

@{b}   NAME@{ub}
	allocmat -- Low level matrix allocation.

@{b}   SYNOPSIS@{ub}
	success = allocmat( mat )
	DO		    A0
	      
	BOOL allocmat( struct matrix * );

@{b}   FUNCTION@{ub}
	Matrix memory allocation, if matrix dimensions are
	already assigned. This function requires you know the matrix
	structure. In this sense it is a low level function.

@{b}   INPUTS@{ub}
	mat - a statically or dynamically allocated matrix instance.
	It must have already initialized dimensions.

@{b}   RESULT@{ub}
	success - TRUE if successful, FAlSE otherwise.

@{b}   EXAMPLE@{ub}
	success=allocmat(mat);

@{b}   NOTES@{ub}
	Only double digits matrix allowed.
	Note that then you cannot free the matrix structure, if it was
	statically allocated.

@{b}   DEBUG@{ub}
	Use the macro AllocMat. Not already active.

@{b}   BUGS@{ub}
	Never use the return value, when using debug macro support.

@{b}   SEE ALSO@{ub}
	@{"allocmatmem()" Link "allocmatmem()"}, @{"allocmatcopy()" Link "allocmatcopy()"}, @{"freemat()" Link "freemat()"}, @{"freematmem()" Link "freematmem()"},
	@{"allocfuncmat()" Link "allocfuncmat()"}, @{"allocfuncmatmem()" Link "allocfuncmatmem()"}, @{"allocfuncmatcopy()" Link "allocfuncmatcopy()"},
	@{"freefuncmat()" Link "freefuncmat()"}, @{"freefuncmatmem()" Link "freefuncmatmem()"}.

@EndNode

@Node "allocmatcopy()" "AMTieee.library/allocmatcopy"

@{b}   NAME@{ub}
	allocmatcopy -- allocation of an empty copy of a given matrix

@{b}   SYNOPSIS@{ub}
	rmat = allocmatcopy( mat )
	A0		     A0
 
	struct matrix *allocmatcopy(struct matrix *);

@{b}   FUNCTION@{ub}
	This is a more safe procedure than assigning matrix dimensions.

@{b}   INPUTS@{ub}
	mat - the pointer of the original matrix.

@{b}   RESULT@{ub}
	rmat = matrix pointer if successful, NULL otherwise.

@{b}   EXAMPLE@{ub}
	rmat = allocmatcopy(mat);

@{b}   NOTES@{ub}
	Nothing.
	
@{b}   DEBUG@{ub}
	Use the macro AllocMatCopy. Not already active.

@{b}   BUGS@{ub}
	Never use the return value, when using the debug macro support.
	<mat> must be a valid matrix pointer.

@{b}   SEE ALSO@{ub}
	@{"allocmat()" Link "allocmat()"}, @{"allocmatmem()" Link "allocmatmem()"}, @{"freemat()" Link "freemat()"}, @{"freematmem()" Link "freematmem()"},
	@{"allocfuncmat()" Link "allocfuncmat()"}, @{"allocfuncmatmem()" Link "allocfuncmatmem()"}, @{"allocfuncmatcopy()" Link "allocfuncmatcopy()"},
	@{"freefuncmat()" Link "freefuncmat()"}, @{"freefuncmatmem()" Link "freefuncmatmem()"}.

@EndNode

@Node "allocmatmem()" "AMTieee.library/allocmatmem"

@{b}   NAME@{ub}
	allocmatmem -- High level matrix allocation.

@{b}   SYNOPSIS@{ub}
	mat = allocmatmem( m, n )
	AO		   D0 D1
	      
 
	struct matrix * allocmatmem( UWORD, UWORD );

@{b}   FUNCTION@{ub}
	Matrix memory allocation. You must supply the desired dimensions.
	This function does not require you know the matrix
	structure. In this sense it is a high level function.
	

@{b}   INPUTS@{ub}
	m - user desired rows in the new matrix.
	n - user desired columns in the new matrix.

@{b}   RESULT@{ub}
	mat = matrix pointer if successful, NULL otherwise.

@{b}   EXAMPLE@{ub}
	mat = allocmatmem(m,n);

@{b}   NOTES@{ub}
	It requires no knowledge of the matrix structure.
	
@{b}   DEBUG@{ub}
	Use the macro AllocMatMem. Not already active.

@{b}   BUGS@{ub}
	Never use the return value, when using the debug macro support.

@{b}   SEE ALSO@{ub}
	@{"allocmat()" Link "allocmat()"}, @{"allocmatcopy()" Link "allocmatcopy()"}, @{"freemat()" Link "freemat()"}, @{"freematmem()" Link "freematmem()"},
	@{"allocfuncmat()" Link "allocfuncmat()"}, @{"allocfuncmatmem()" Link "allocfuncmatmem()"}, @{"allocfuncmatcopy()" Link "allocfuncmatcopy()"},
	@{"freefuncmat()" Link "freefuncmat()"}, @{"freefuncmatmem()" Link "freefuncmatmem()"}.

@EndNode

@Node "checkdim()" "AMTieee.library/checkdim"

@{b}   NAME@{ub}
	checkdim -- checks matrix dimensions consistence.

@{b}   SYNOPSIS@{ub}
	success = checkdim( A, B, C, flag )
	D0		    A0 A1 A2 D0
 
	BOOL checkdim(
		struct matrix *A,
		struct matrix *B,
		struct matrix *C,
		UWORD flag);

@{b}   FUNCTION@{ub}
	This is the core function for all Debug Procedures. You can
	call it yourself or, more simply, use the macros listed in
	the AMT.h include file.
	When debug support is supplied and the user define flag MYDEBUG
	has been switched on, these macros provide an automatic way to
	check functions for their args consistence.
	For instance, the macro MatPlus(A,B,C) is translated into

	{ D(bug("matplus\n")); if(checkdim(A,B,C,PLUS)) matplus(A,B,C); }

	In this way, programmers can write all the code using the 
	corresponding macros. When all works, simply switching off
	MYDEBUG flag, all debug controls disappear and all functions
	are reduced to a more speedy form.

	The suggested use of this debug function is trough library macros.

@{b}   INPUTS@{ub}
	A    - 1st matrix pointer.
	B    - 2nd matrix pointer.
	C    - 3rd matrix pointer.
	flag - set this flag to different values listed below to get
	       the required action.

	ROWCOL		check row x col matrix multiplication
	PER		previous function check
	COLCOL		check col x col matrix multiplication
	PERCOL		previous function check
	COLROW		check col x row matrix multiplication
	ROWROW		check row x row matrix multiplication
	PERROW		previous function check
	PLUS		check plus operation
	POWER		check 2nd power
	INV		check inverse operation
	COPY		check copy operation
	SQUARE		check for square dimensions
	TRS		check transposition operation

@{b}   RESULT@{ub}
	success - TRUE if successful, FALSE otherwise.

@{b}   EXAMPLE@{ub}
	success = checkdim(A, B, C, flag);

@{b}   NOTES@{ub}
	matdbg is a macro, not a debug function.
	While INV flag really works, MatInv macro is already inactive,
	owing to the return value of the @{"matinv()" Link "matinv()"} function. In this case,
	it is up to you to call the check function.

@{b}   DEBUG@{ub}
	No debug for debug functions themselves.

@{b}   BUGS@{ub}
	Owing to actual macro definitions, it is not possible to join
	macro debug support with return debug values of single functions.
	In the example, it is not possible to write:

	if(MatPlus(A,B,C))
		related_action();

	while it is correct to write:

	if(matplus(A,B,C))
		related_action();

@{b}   SEE ALSO@{ub}
	matdbg macro in the AMT.h include file.

@EndNode

@Node "choosematvar()" "AMTieee.library/choosematvar"

@{b}   NAME@{ub}
	choosematvar -- low level selection routine. No user interface
       required.

@{b}   SYNOPSIS@{ub}
	number = choosematvar( NField, fx, mess, N )
       D0                     A0      D0  A1    A2
 
	UWORD choosematvar(char **,UWORD,char *,UWORD *);

@{b}   FUNCTION@{ub}
       This is a low level selection function, which allows the selection
       of fields in the set of all data file fields. No user interface is
       required, because it uses the standard I/O. This choice is not so
       good, but is effective, if we want to retain compatibility between
       several OS. Reply '*' to select the variable, while press simply
       'RETURN' to skip the variable.
       You can call many times this function on the same file, to select
       different fields for different goals. Of course, in this case you
       must supply several different N arrays to retain the indexes.

@{b}   INPUTS@{ub}
       NField - the array data file field names.
       fx     - the number of data file fields.
       mess   - a pointer to the string message to the user.
       N      - the array of column indexes.

@{b}   RESULT@{ub}
       number - the number of selected fields.

@{b}   EXAMPLE@{ub}
	number = choosematvar(NField,fx,mess,N);

@{b}   NOTES@{ub}
	
@{b}   DEBUG@{ub}
       Use the macro ChooseMatVar. Not already active.

@{b}   BUGS@{ub}
       Max number of allowed fields is 100.

@{b}   SEE ALSO@{ub}
       @{"openmatfile()" Link "openmatfile()"}, @{"matinp()" Link "matinp()"}, @{"file2matrix()" Link "file2matrix()"}.

@EndNode

@Node "CloseKernel()" "AMTieee.library/CloseKernel"

@{b}   NAME@{ub}
	CloseKernel -- Frees all kernel allocations.

@{b}   SYNOPSIS@{ub}
	CloseKernel()

 
	void CloseKernel( void );

@{b}   FUNCTION@{ub}
	Frees all kernel allocations.

@{b}   INPUTS@{ub}
	Nothing.

@{b}   RESULT@{ub}
	Nothing.

@{b}   EXAMPLE@{ub}
	CloseKernel();

@{b}   NOTES@{ub}
       YOU MUST call it, if you are using the LINKABLE version of the
       library, while it is automatically called when closing the
       SHARED version.
	
@{b}   DEBUG@{ub}
       No support.

@{b}   BUGS@{ub}
	None.

@{b}   SEE ALSO@{ub}
	@{"InitKernel()" Link "InitKernel()"}.

@EndNode

@Node "file2matrix()" "AMTieee.library/file2matrix"

@{b}   NAME@{ub}
	file2matrix -- high level data input from file.

@{b}   SYNOPSIS@{ub}
	xmat = file2matrix( fil, flag )

 
	struct matrix *file2matrix(char *, BOOL);

@{b}   FUNCTION@{ub}
       This is a high level file input function and its use is higly
       recommended, for it is simple. The file name supplied will be
       retained without extension. So extension can be any. The function
       requires that accordingly .exp and .def file are in the current
       path.
       The selection option is set by means of the flag. Supported values
       are ALLVAR and CHOOSE. Selection will be performed with a low
       level I/O function.

@{b}   INPUTS@{ub}
       fil  - the File name pointer. Extension will be ignored.
       flag - set it to ALLVAR, to signal you want all the variables,
              while set it to CHOOSE, to select a limited set of them.

@{b}   RESULT@{ub}
       xmat - a pointer to the data matrix if successful, otherwise
       FALSE.

@{b}   EXAMPLE@{ub}
	xmat = file2matrix(fil, flag);

@{b}   NOTES@{ub}
       .def and .exp files must be in the current path.
	
@{b}   DEBUG@{ub}
       Use the macro . Not already active.

@{b}   BUGS@{ub}
       Max Data lenght is 255 characters, while max number of data
       fields is 100. Unpredictable errors will occur when these
       values are exceded.
       Problems also in floating point input. No problem with long
       numbers input.

@{b}   SEE ALSO@{ub}
       @{"openmatfile()" Link "openmatfile()"}, @{"choosematvar()" Link "choosematvar()"}, @{"matinp()" Link "matinp()"}.

@EndNode

@Node "freefuncmat()" "AMTieee.library/freefuncmat"

@{b}   NAME@{ub}
	freefuncmat -- low level functional matrix deallocation.

@{b}   SYNOPSIS@{ub}
	freefuncmat( mat )
		     A0
 
	void freefuncmat(struct matfunc *mat);

@{b}   FUNCTION@{ub}
	Functional Matrix memory deallocation. It does not free the
	structure itself, however. In this sense, it is a low level
	function.

@{b}   INPUTS@{ub}
	mat - a pointer to the functional matrix you want to free.

@{b}   RESULT@{ub}
	Nothing

@{b}   EXAMPLE@{ub}
	freefuncmat(mat);

@{b}   NOTES@{ub}
	You will not free the structure itself, but only the data space.
	
@{b}   DEBUG@{ub}
	Use the macro FreeFuncMat. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
	@{"allocmat()" Link "allocmat()"}, @{"allocmatmem()" Link "allocmatmem()"}, @{"allocmatcopy()" Link "allocmatcopy()"},
	@{"allocfuncmat()" Link "allocfuncmat()"}, @{"allocfuncmatmem()" Link "allocfuncmatmem()"}, @{"allocfuncmatcopy()" Link "allocfuncmatcopy()"},
	@{"freemat()" Link "freemat()"}, @{"freematmem()" Link "freematmem()"}, @{"freefuncmatmem()" Link "freefuncmatmem()"}.

@EndNode

@Node "freefuncmatmem()" "AMTieee.library/freefuncmatmem"

@{b}   NAME@{ub}
	freefuncmatmem -- high level functional matrix deallocation.

@{b}   SYNOPSIS@{ub}
	freefuncmatmem( mat )
		        A0
 
	void freefuncmatmem(struct matfunc *mat);

@{b}   FUNCTION@{ub}
	Functional Matrix memory deallocation. It frees also the
	structure itself. In this sense, it is a high level function.

@{b}   INPUTS@{ub}
	mat - a pointer to the functional matrix you want to free.

@{b}   RESULT@{ub}
	Nothing

@{b}   EXAMPLE@{ub}
	freefuncmatmem(mat);

@{b}   NOTES@{ub}
	You will free function pointers data space and the matfunc
	structure itself.
	
@{b}   DEBUG@{ub}
	Use the macro FreeFuncMatMem. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
	@{"allocmat()" Link "allocmat()"}, @{"allocmatmem()" Link "allocmatmem()"}, @{"allocmatcopy()" Link "allocmatcopy()"}, 
	@{"allocfuncmat()" Link "allocfuncmat()"}, @{"allocfuncmatmem()" Link "allocfuncmatmem()"}, @{"allocfuncmatcopy()" Link "allocfuncmatcopy()"},
	@{"freemat()" Link "freemat()"}, @{"freematmem()" Link "freematmem()"}, @{"freefuncmat()" Link "freefuncmat()"}.

@EndNode

@Node "freemat()" "AMTieee.library/freemat"

@{b}   NAME@{ub}
	freemat -- low level matrix deallocation.

@{b}   SYNOPSIS@{ub}
	freemat( mat )
		 A0
 
	void freemat(struct matrix *mat);

@{b}   FUNCTION@{ub}
	Matrix memory deallocation. It does not free the structure
	itself, however. In this sense, it is a low level function.

@{b}   INPUTS@{ub}
	mat - a pointer to the matrix you want to free.

@{b}   RESULT@{ub}
	Nothing

@{b}   EXAMPLE@{ub}
	freemat(mat);

@{b}   NOTES@{ub}
	You will not free the structure itself, but only the data space.
	
@{b}   DEBUG@{ub}
	Use the macro FreeMat. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
	@{"allocmat()" Link "allocmat()"}, @{"allocmatmem()" Link "allocmatmem()"}, @{"allocmatcopy()" Link "allocmatcopy()"}, @{"freematmem()" Link "freematmem()"},
	@{"allocfuncmat()" Link "allocfuncmat()"}, @{"allocfuncmatmem()" Link "allocfuncmatmem()"}, @{"allocfuncmatcopy()" Link "allocfuncmatcopy()"},
	@{"freefuncmat()" Link "freefuncmat()"}, @{"freefuncmatmem()" Link "freefuncmatmem()"}.

@EndNode

@Node "freematmem()" "AMTieee.library/freematmem"

@{b}   NAME@{ub}
	freematmem -- high level matrix deallocation.

@{b}   SYNOPSIS@{ub}
	freematmem( mat )
		    A0
 
	void freematmem(struct matrix *mat);

@{b}   FUNCTION@{ub}
	Matrix memory deallocation. It frees also the structure
	itself. In this sense, it is a high level function.

@{b}   INPUTS@{ub}
	mat - a pointer to the matrix you want to free.

@{b}   RESULT@{ub}
	Nothing

@{b}   EXAMPLE@{ub}
	freematmem(mat);

@{b}   NOTES@{ub}
	You will free data space and the matrix structure itself.
	
@{b}   DEBUG@{ub}
	Use the macro FreeMatMem. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
	@{"allocmat()" Link "allocmat()"}, @{"allocmatmem()" Link "allocmatmem()"}, @{"allocmatcopy()" Link "allocmatcopy()"}, @{"freemat()" Link "freemat()"},
	@{"allocfuncmat()" Link "allocfuncmat()"}, @{"allocfuncmatmem()" Link "allocfuncmatmem()"}, @{"allocfuncmatcopy()" Link "allocfuncmatcopy()"},
	@{"freefuncmat()" Link "freefuncmat()"}, @{"freefuncmatmem()" Link "freefuncmatmem()"}.

@EndNode

@Node "getarray()" "AMTieee.library/getarray"

@{b}   NAME@{ub}
	getarray -- gets the pointer of matrix data space.

@{b}   SYNOPSIS@{ub}
	admat = getarray( mat )
       A0                A0
 
	double **getarray(struct matrix *);

@{b}   FUNCTION@{ub}
       Use this function to get transparently the array address.

@{b}   INPUTS@{ub}
       mat - the matrix pointer.

@{b}   RESULT@{ub}
       admat - the matrix data array pointer-

@{b}   EXAMPLE@{ub}
	admat = getarray(mat);

@{b}   NOTES@{ub}
       Never enter the matrix structure to get the array pointer.
       The matrix structure is subject to changes. To be upward
       compatible use this function.
	
@{b}   DEBUG@{ub}
       Use the macro GetArray. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
       @{"getdim()" Link "getdim()"}, @{"getfuncdim()" Link "getfuncdim()"}.

@EndNode

@Node "getdim()" "AMTieee.library/getdim"

@{b}   NAME@{ub}
	getdim -- gets the matrix selected dimension.

@{b}   SYNOPSIS@{ub}
	dim = getdim( mat, flag )
       D0            A0   D0
 
	UWORD getdim(struct matrix *, BOOL);

@{b}   FUNCTION@{ub}
       Use this function to get transparently the matrix dimensions.
       Set the flag to MATCOL or MATROW to rispectively get the
       column or the row dimension.

@{b}   INPUTS@{ub}
       mat  - the matrix pointer.
       flag - flag to select the dimension you want to know.
              Set the flag to MATCOL or MATROW to rispectively
              get the column or the row dimension.
@{b}   RESULT@{ub}
       dim - the dimension you are asking of.

@{b}   EXAMPLE@{ub}
	dim = getdim(mat, flag);

@{b}   NOTES@{ub}
       Never enter the matrix structure to get the array dims.
       The matrix structure is subject to changes. To be upward
       compatible use this function.
	
@{b}   DEBUG@{ub}
       Use the macro GetDim. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
       @{"getarray()" Link "getarray()"}, @{"getfuncdim()" Link "getfuncdim()"}.

@EndNode

@Node "getepsilon()" "AMTieee.library/getepsilon"

@{b}   NAME@{ub}
	getepsilon -- reads the kernel stored machine epsilon.

@{b}   SYNOPSIS@{ub}
	epsilon = getepsilon()
       D0
 
	double getepsilon( void );

@{b}   FUNCTION@{ub}
       Reads the kernel stored machine epsilon, i.e. the least double
       difference that can be detected by your machine. It is a variable
       value, also on two identical machines.

@{b}   INPUTS@{ub}
       Nothing.

@{b}   RESULT@{ub}
       epsilon - the machine epsilon, the least double value.

@{b}   EXAMPLE@{ub}
	epsilon = getepsilon();

@{b}   NOTES@{ub}
       As to this library version, this function returns only the
       factory value, i.e. the value readable in math includes.
	
@{b}   DEBUG@{ub}
       Use the macro GetEpsilon. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
       @{"getprecision()" Link "getprecision()"}, getlastprecision(), @{"printusing()" Link "printusing()"}, @{"getformat()" Link "getformat()"}.

@EndNode

@Node "getformat()" "AMTieee.library/getformat"

@{b}   NAME@{ub}
	getformat -- reads the current format for int/float numbers.

@{b}   SYNOPSIS@{ub}
	format = getformat( flag )
       A0                  D0
 
	char *getformat( BOOL );

@{b}   FUNCTION@{ub}
       Reads the current format for int/float numbers. Default format
       strings are "%4.9f" and "%4.0d" respectively.

@{b}   INPUTS@{ub}
       flag - set it to INTFMT to get current format for int numbers,
              while set it to FLOATFMT to get it for float ones.

@{b}   RESULT@{ub}
       format - the output format for int/float numbers, depending
                on the flag value. The format string is the one
                required for standard I/O functions, as @{"printf" Link "amiga_lib/printf()"}, etc.

@{b}   EXAMPLE@{ub}
	format = getformat(flag);

@{b}   NOTES@{ub}
       This is a floating point library, but the capability of setting
       int format works also for internal int use. 
	
@{b}   DEBUG@{ub}
       Use the macro GetFormat. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
       @{"getprecision()" Link "getprecision()"}, @{"setprecision()" Link "setprecision()"}, @{"printusing()" Link "printusing()"}, @{"getepsilon()" Link "getepsilon()"}.

@EndNode

@Node "getfuncdim()" "AMTieee.library/getfuncdim"

@{b}   NAME@{ub}
	getfuncdim -- gets the functional matrix selected dimension.

@{b}   SYNOPSIS@{ub}
	dim = getfuncdim( fmat, flag )
       D0                A0   D0
 
	UWORD getfuncdim(struct matfunc *, BOOL);

@{b}   FUNCTION@{ub}
       Use this function to get transparently the functional matrix
       dims. Set the flag to MATCOL or MATROW to rispectively get the
       column or the row dimension.

@{b}   INPUTS@{ub}
       fmat  - the functional matrix pointer.
       flag - flag to select the dimension you want to know.
              Set the flag to MATCOL or MATROW to rispectively
              get the column or the row dimension.
@{b}   RESULT@{ub}
       dim - the dimension you are asking of.

@{b}   EXAMPLE@{ub}
	dim = getfuncdim(fmat, flag);

@{b}   NOTES@{ub}
       Never enter the matfunc structure to get the array dims.
       The matfunc structure is subject to changes. To be upward
       compatible use this function.
	
@{b}   DEBUG@{ub}
       Use the macro GetFuncDim. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
       @{"getarray()" Link "getarray()"}, @{"getdim()" Link "getdim()"}.

@EndNode

@Node "getiterations()" "AMTieee.library/getiterations"

@{b}   NAME@{ub}
	getiterations -- reads current computing iterations.

@{b}   SYNOPSIS@{ub}
	iterations = getiterations()
       D0
 
	int getiterations( void );

@{b}   FUNCTION@{ub}
       reads current internal iterations of iterative computing
       methods.

@{b}   INPUTS@{ub}
       Nothing.

@{b}   RESULT@{ub}
       iterations - the current internal iterations.

@{b}   EXAMPLE@{ub}
	getiterations();

@{b}   NOTES@{ub}
       Default value is 100 iterations.
	
@{b}   DEBUG@{ub}
       Use the macro . Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
       @{"matavl()" Link "matavl()"}, @{"setiterations()" Link "setiterations()"}.

@EndNode

@Node "getlastiteration()" "AMTieee.library/getlastiteration"

@{b}   NAME@{ub}
	getlastiteration -- reads the last number of iterations
       performed by an iterative procedure.

@{b}   SYNOPSIS@{ub}
	iteration = getlastiteration()
       D0
 
	int getlastiteration( void );

@{b}   FUNCTION@{ub}
       Iterative procedures exit whenever max number of iterations
       has been performed or the required precision has been gained.
       This function lets you know how many iterations were needed
       to gain last gained precision.

@{b}   INPUTS@{ub}
       Nothing.

@{b}   RESULT@{ub}
       iteration - the last number of iterations.

@{b}   EXAMPLE@{ub}
	iteration = getlastiteration();

@{b}   NOTES@{ub}
	Default max iteration value is set to 100 iterations.
@{b}   DEBUG@{ub}
       Use the macro GetLastIteration. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
       @{"setiterations()" Link "setiterations()"}, @{"matavl()" Link "matavl()"}, getlastprecision().

@EndNode

@Node "getmatperid()" "AMTieee.library/getmatperid"

@{b}   NAME@{ub}
	getmatperid -- reads the current matrix multiplying method.

@{b}   SYNOPSIS@{ub}
	perid =         getmatperid()
       D0
 
	int getmatperid( void );

@{b}   FUNCTION@{ub}
       Gets the kind of matrix multiplication: rows x columns, columns
       x columns, columns x rows, rows x rows. Note that you will get
       only a number.

@{b}   INPUTS@{ub}
       Nothing.

@{b}   RESULT@{ub}
       perid - the desired matrix multiplication method. It can be
               ROWCOL, COLCOL, COLROW, ROWROW. See @{"matper()" Link "matper()"} for the
               related info.
               Perid is a number. Here follows the description:

               1               ROWCOL or PER
               2               COLCOL or PERCOL
               3               COLROW
               4               ROWROW or PERROW

@{b}   EXAMPLE@{ub}
	perid = getmatperid();

@{b}   NOTES@{ub}
       Note this use of the function: CheckDim(A,B,C,GetMatPerId());
	
@{b}   DEBUG@{ub}
       Use the macro GetMatPerId. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
       @{"matper()" Link "matper()"}, @{"setmatperid()" Link "setmatperid()"}, @{"checkdim()" Link "checkdim()"}.

@EndNode

@Node "getprecision()" "AMTieee.library/getprecision"

@{b}   NAME@{ub}
	getprecision -- reads current computing precision.

@{b}   SYNOPSIS@{ub}
	precision = getprecision()
       D0
 
	double getprecision( void );

@{b}   FUNCTION@{ub}
       reads current computing precision. Totally different from
       output format or from machine epsilon.

@{b}   INPUTS@{ub}
       Nothing.

@{b}   RESULT@{ub}
       precision - the current computing precision.

@{b}   EXAMPLE@{ub}
	precision = getprecision();

@{b}   NOTES@{ub}
       Do not confuse computing precision, machine epsilon and output
       format.
	
@{b}   DEBUG@{ub}
       Use the macro GetPrecision. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
      @{"setprecision()" Link "setprecision()"}, @{"getepsilon()" Link "getepsilon()"}, @{"printusing()" Link "printusing()"}. 

@EndNode

@Node "getseed()" "AMTieee.library/getseed"

@{b}   NAME@{ub}
	getseed -- reads the automatically computed external seed.

@{b}   SYNOPSIS@{ub}
	seed = getseed()
       A0
 
	UWORD *getseed(void);

@{b}   FUNCTION@{ub}
       Reads the external seed of the random digits sequence. The
       seed is private for each library user. The usefulness is clear.
       The pseudo-random character of the sequence is retained only
       if it is used the same seed used for other internal library
       functions. Really, the seed is not fixed, because it changes
       its value whenever a random digit is requested. So the only
       fixed element is the seed pointer. Using another seed makes
       sense only when the sequence to be generated must not have
       any connection with the previous one. As in any other math
       operation, the choice must be a reasoned one and it is up to
       the programmer to evaluate the effectiveness ot a method or
       another.

@{b}   INPUTS@{ub}
       Nothing.

@{b}   RESULT@{ub}
       seed - a pointer to the external seed array. The external
              seed is an array of three UWORD.

@{b}   EXAMPLE@{ub}
	seed = getseed();

@{b}   NOTES@{ub}
       Each library user has a different random external seed.
       When library is open, random seed is set using the actual time.
       Pay attention: if you use a floppy based system, time can be
       always the same at startup.
	
@{b}   DEBUG@{ub}
       Use the macro GetSeed . Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
       @{"matrandom()" Link "matrandom()"}.

@EndNode

@Node "InitKernel()" "AMTieee.library/InitKernel"

@{b}   NAME@{ub}
	InitKernel -- Initializes all Matrix Kernel variables.

@{b}   SYNOPSIS@{ub}
	success = InitKernel()
	D0
 
	BOOL InitKernel(void);

@{b}   FUNCTION@{ub}
	Initializes the Kernel. This is a set of transparent data, used
	to manage computing precision and iterations, output format and
	random numbers generation.

@{b}   INPUTS@{ub}
	Nothing.

@{b}   RESULT@{ub}
	success - TRUE if successful, otherwise FALSE.

@{b}   EXAMPLE@{ub}
	success = InitKernel();

@{b}   NOTES@{ub}
       YOU MUST call it, if you are using the LINKABLE version of the
       library, while it is automatically called when opening the
       SHARED version.
	
@{b}   DEBUG@{ub}
       No support.

@{b}   BUGS@{ub}
	None.

@{b}   SEE ALSO@{ub}
	@{"CloseKernel()" Link "CloseKernel()"}.

@EndNode

@Node "loadmatfunc()" "AMTieee.library/loadmatfunc"

@{b}   NAME@{ub}
	loadmatfunc -- sets the elements of the i-th row and of the
	j-th col of a functional matrix to the function p.

@{b}   SYNOPSIS@{ub}
	success= loadmatfunc( fnmat, p, row, col )
		              A0     A1 D0   D1
 
	BOOL loadmatfunc(
		struct matfunc *fnmat,
		double (*p)(),
		UWORD row,
		UWORD col);

@{b}   FUNCTION@{ub}
	sets the elements of the i-th row and of the j-th col of a
	functional matrix to the function p.

@{b}   INPUTS@{ub}
	fnmat - the functional matrix pointer.
	p     - the pointer to a function which return a double.
	row   - the row position of the matfunc element.
	col   - the col position of the matfunc element.

@{b}   RESULT@{ub}
	success - TRUE if successful, otherwise FALSE.
	  Fails if row and col are out of allowed values for fnmat.

@{b}   EXAMPLE@{ub}
	success = loadmatfunc(fnmat, p, row, col);

@{b}   NOTES@{ub}
	Analogous of @{"matfunceq()" Link "matfunceq()"}, but for only one element.

@{b}   DEBUG@{ub}
	Use the macro LoadMatFunc. Not already active.
	
@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
	@{"matzer()" Link "matzer()"}, @{"matidn()" Link "matidn()"}, @{"mateq()" Link "mateq()"},
	@{"matfuncnull()" Link "matfuncnull()"}, @{"matfuncidn()" Link "matfuncidn()"}, @{"matfunceq()" Link "matfunceq()"}.

@EndNode

@Node "matavl()" "AMTieee.library/matavl"

@{b}   NAME@{ub}
	matavl -- Eigenvalues and Eigenvectors of a square and symmetric 
	matrix.

@{b}   SYNOPSIS@{ub}
	success = matavl( amat, umat, flag)
	D0	          A0    A1    D0
 
	BOOL matavl(struct matrix *amat,struct matrix *umat,UWORD flag);

@{b}   FUNCTION@{ub}
	Computes the Eigenvalues and Eigenvectors of a square and symmetric
	matrix. These values are the solution fo the matricial equation:

				(A -kI)X = 0;

	where A is the original matrix (amat), I is the unitary matrix, 
	k is an eigenvalue and X is an eigenvector, i.e. a column.
	Owing to the existence of as many solutions as many rows( or cols),
	the result can be arranged into a diagonal matrix of eigenvalues
	and into another matrix, whose columns are the corresponding
	eigenvectors.

@{b}   INPUTS@{ub}
	amat - the original matrix pointer.
	umat - the eigenvectors matrix pointer.
	flag - a flag, which sets the iteration method. Allowed values
	are listed below:

	AMT_RUN		All must be performed by one step procedure.
	AMT_FIRST	This is the first step.
	AMT_ITERATE	This is a middle step.
	AMT_LAST	This is last step.

@{b}   RESULT@{ub}
	success - TRUE if successful, FALSE otherwise;

@{b}   EXAMPLE@{ub}
	/* For one step procedure: */

	success = matavl(amat, umat, AMT_RUN);

	/* For iterative procedure: */

	success = matavl(amat, umat, AMT_FIRST);
	success = matavl(amat, umat, AMT_ITERATE);
	/*.........................................
	.........................................*/
	success = matavl(amat, umat, AMT_ITERATE);
	success = matavl(amat, umat, AMT_LAST);

@{b}   NOTES@{ub}
	
@{b}   DEBUG@{ub}
	Use the macro MatAvl. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
	getlastprecision(), @{"getlastiteration()" Link "getlastiteration()"}.

@EndNode

@Node "matcopy()" "AMTieee.library/matcopy"

@{b}   NAME@{ub}
	matcopy -- Makes a copy of A-matrix in B-matrix.

@{b}   SYNOPSIS@{ub}
	success = matcopy( amat, bmat )
	D0		   A0    A1
 
	success = matcopy(struct matrix *amat,struct matrix *bmat);

@{b}   FUNCTION@{ub}
	Makes a copy of A-matrix in B-matrix.

@{b}   INPUTS@{ub}
	amat - the original matrix pointer.
	bmat - the destination matrix pointer.

@{b}   RESULT@{ub}
	success - TRUE if successful, otherwise FALSE.

@{b}   EXAMPLE@{ub}
	success = matcopy(amat, bmat);

@{b}   NOTES@{ub}
	amat and bmat must have the same dimensions.
	
@{b}   DEBUG@{ub}
	Use the macro MatCopy.

@{b}   BUGS@{ub}
	Never use the return value, when using the debug macro support.

@{b}   SEE ALSO@{ub}
	@{"matcopyrd()" Link "matcopyrd()"}, @{"matfunccopy()" Link "matfunccopy()"}.

@EndNode

@Node "matcopyrd()" "AMTieee.library/matcopyrd"

@{b}   NAME@{ub}
	matcopyrd -- Makes a copy of A-matrix in B-matrix, considering
	only rows and columns that fit in the destination matrix.

@{b}   SYNOPSIS@{ub}
	matcopyrd( amat, bmat )
		   A0    A1
 
	matcopy(struct matrix *amat,struct matrix *bmat);

@{b}   FUNCTION@{ub}
	Makes a copy of A-matrix in B-matrix, copying only those elements
	which fit in the destination matrix. Practically it is equivalent
	to matcopy performed on a minimun number of rows and columns.

@{b}   INPUTS@{ub}
	amat - the original matrix pointer.
	bmat - the destination matrix pointer.

@{b}   RESULT@{ub}
	Nothing.

@{b}   EXAMPLE@{ub}
	matcopyrd(amat, bmat);

@{b}   NOTES@{ub}
	
@{b}   DEBUG@{ub}
	Use the macro MatCopyRd. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
	@{"matcopy()" Link "matcopy()"}, @{"matfunccopy()" Link "matfunccopy()"}.

@EndNode

@Node "mateq()" "AMTieee.library/mateq"

@{b}   NAME@{ub}
	mateq -- Assign all the matrix elements the value Val.

@{b}   SYNOPSIS@{ub}
	mateq( amat, Val)
	       A0    D0

	void mateq(struct matrix *amat,double Val);

@{b}   FUNCTION@{ub}
	Enters the value Val in all the elements of the matrix.

@{b}   INPUTS@{ub}
	amat - the matrix pointer.
	Val  - the value you want to assign.

@{b}   RESULT@{ub}
	Nothing.

@{b}   EXAMPLE@{ub}
	mateq(amat,Val);

@{b}   NOTES@{ub}
	
@{b}   DEBUG@{ub}
	Use the macro MatEq. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
	@{"matzer()" Link "matzer()"}, @{"matidn()" Link "matidn()"}, @{"matfuncnull()" Link "matfuncnull()"}, @{"matfuncidn()" Link "matfuncidn()"}, @{"matfunceq()" Link "matfunceq()"}.

@EndNode

@Node "matfunccopy()" "AMTieee.library/matfunccopy"

@{b}   NAME@{ub}
	matfunccopy -- makes a numerical copy of a functional matrix
	for a single value of the t parameter.

@{b}   SYNOPSIS@{ub}
	success = matfunccopy( fnmat, t, bmat)
	D0		       A0     D0 A1
 
	BOOL matfunccopy(
		struct matfunc *fnmat,
		double t,
		struct matrix *bmat);

@{b}   FUNCTION@{ub}
	The two separated worlds of matrices and functional matrices
	can be linked, at least in only one direction, by means of this
	function, which makes a numerical copy of a functional matrix
	for a single value of the t parameter.
	Application spread in a very wide field. Consider you know a
	set of functions of time. In this way, you can compute all the
	results by means of a single function call.
	Examples: a numerical spreadsheet, wireframe points ....

@{b}   INPUTS@{ub}
	fnmat - the functional matrix pointer.
	t     - the double value to give as arg to all functions.
	bmat  - the t-instantiated numerical copy of fnmat.

@{b}   RESULT@{ub}
	success - TRUE if successful, otherwise FALSE.

@{b}   EXAMPLE@{ub}
	success = matfunccopy(fnmat, t bmat);

@{b}   NOTES@{ub}
	Analogous of @{"matcopy()" Link "matcopy()"}.

@{b}   DEBUG@{ub}
	Use the macro MatFuncCopy. Not already active.

@{b}   BUGS@{ub}
	Never use the return value, when using the debug macro support.
	There are possible math errors, due to not allowed values of t.
	This cannot be predicted, because it depends on the single
	functions which have been loaded into the functional matrix.
	It is up to the programmer to check supplied functions 	against
	the possible values of t. Of course make a theoretically check.

@{b}   SEE ALSO@{ub}
	@{"matcopy()" Link "matcopy()"}.

@EndNode

@Node "matfunceq()" "AMTieee.library/matfunceq"

@{b}   NAME@{ub}
	matfunceq -- sets all the elements of a functional matrix to
	the same function.

@{b}   SYNOPSIS@{ub}
	matfunceq( fnmat, p )
		   A0     A1
 
	void matfunceq( struct matfunc *fnmat, double (*p)() );

@{b}   FUNCTION@{ub}
	sets all the elements of a functional matrix to
	the same function which returns a double value.


@{b}   INPUTS@{ub}
	fnmat - the functional matrix pointer.
	p     - the pointer to a function which return a double.

@{b}   RESULT@{ub}
	Nothing.

@{b}   EXAMPLE@{ub}
	matfunceq(fnmat, p);

@{b}   NOTES@{ub}
	Analogous of @{"mateq()" Link "mateq()"}.

@{b}   DEBUG@{ub}
	Use the macro MatFuncEq. Not already active.
	
@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
	@{"matzer()" Link "matzer()"}, @{"matidn()" Link "matidn()"}, @{"mateq()" Link "mateq()"}, matfuncnull, @{"matfuncidn()" Link "matfuncidn()"}.

@EndNode

@Node "matfuncidn()" "AMTieee.library/matfuncidn"

@{b}   NAME@{ub}
	matfuncidn -- Loads functions which return 1 in all principal
	diagonal elements, functions which return 0 in not diagonal ones.

@{b}   SYNOPSIS@{ub}
	success = matfuncidn( fnmat )
	            A0
 
	BOOL matfuncidn( struct matrix *fnmat );

@{b}   FUNCTION@{ub}
	Builds the MxN functional unitary matrix.
	Loads functions which return 1 in all principal diagonal
	elements, functions which return 0 in not diagonal ones.

@{b}   INPUTS@{ub}
	fnmat - the matfunc pointer.

@{b}   RESULT@{ub}
	success - TRUE if successful, otherwise FALSE.

@{b}   EXAMPLE@{ub}
	matfuncidn(fnmat);

@{b}   NOTES@{ub}
	Analogous of @{"matidn()" Link "matidn()"}.
	In order to have a diagonal, fnmat must be a square matrix.

@{b}   DEBUG@{ub}
	Use the macro MatFuncIdn. Not already active.

@{b}   BUGS@{ub}
	Never use the return value, when using the debug macro support.

@{b}   SEE ALSO@{ub}
	@{"matzer()" Link "matzer()"}, @{"matidn()" Link "matidn()"}, @{"mateq()" Link "mateq()"}, @{"matfuncnull()" Link "matfuncnull()"}, @{"matfunceq()" Link "matfunceq()"}.

@EndNode

@Node "matfuncnull()" "AMTieee.library/matfuncnull"

@{b}   NAME@{ub}
	matfuncnull -- Loads functions which return zero in all
	functional matrix elements.

@{b}   SYNOPSIS@{ub}
	matfuncnull( fnmat )
	             A0
 
	void matfuncnull(struct matrix *fnmat);

@{b}   FUNCTION@{ub}
	Loads functions which return zero in all functional matrix
	elements.

@{b}   INPUTS@{ub}
	fnmat - the matfunc pointer.

@{b}   RESULT@{ub}
	Nothing.

@{b}   EXAMPLE@{ub}
	matfuncnull(fnmat);

@{b}   NOTES@{ub}
	Analogous of @{"matzer()" Link "matzer()"}.

@{b}   DEBUG@{ub}
	Use the macro MatFuncNull. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
	@{"matzer()" Link "matzer()"}, @{"matidn()" Link "matidn()"}, @{"mateq()" Link "mateq()"}, @{"matfuncidn()" Link "matfuncidn()"}, @{"matfunceq()" Link "matfunceq()"}.

@EndNode

@Node "matidn()" "AMTieee.library/matidn"

@{b}   NAME@{ub}
	matidn -- Loads 1 in all principal diagonal elements, 0 in not
	diagonal ones.

@{b}   SYNOPSIS@{ub}
	success = matidn( amat )
	D0	  	  A0
 
	BOOL matidn(struct matrix *amat);

@{b}   FUNCTION@{ub}
	Builds the MxN unitary matrix.

@{b}   INPUTS@{ub}
	amat - the matrix pointer.

@{b}   RESULT@{ub}
	success - TRUE if successful, otherwise FALSE.

@{b}   EXAMPLE@{ub}
	success = matidn(amat);

@{b}   NOTES@{ub}
	In order to have a diagonal, amat must be a square matrix.
	
@{b}   DEBUG@{ub}
	Use the macro MatIdn.

@{b}   BUGS@{ub}
	Never use the return value, when using the debug macro support.

@{b}   SEE ALSO@{ub}
	@{"mateq()" Link "mateq()"}, @{"matzer()" Link "matzer()"}, @{"matfuncnull()" Link "matfuncnull()"}, @{"matfuncidn()" Link "matfuncidn()"}, @{"matfunceq()" Link "matfunceq()"}.

@EndNode

@Node "matinp()" "AMTieee.library/matinp"

@{b}   NAME@{ub}
	matinp -- input from data file, whence file header has been
       already read.

@{b}   SYNOPSIS@{ub}
	success = matinp( file, fx, Xmat, N, Ndim, op, opval)
       D0                A0    D0  A1    A2 D1    D2  D3
 
	BOOL matinp(
               char *,UWORD,struct matrix *,UWORD *,UWORD,UWORD,double);

@{b}   FUNCTION@{ub}
       reads data from a ASCII .exp kind file. File .def header has been
       already read, so we know how many fields are in the file. As
       to the number of records, it must be consistently the number
       of rows of the input matrix Xmat.
       The function allows the input of a restricted number of columns
       of the input data file. The selected columns are pointed with
       the N array, while their number is given by the Ndim variable.
       To signal that you want all variables set Ndim to 0 or N to NULL.
       In addition, it is possible to set the column number <op> to
       the <opval> constant. To disable this option, set op to 0.
       Note that Xmat must have Ndim+(op!=0) columns, where the boolean
       formula is worth 1 if op is different from 0, otherwise 0.
       The .exp file is a ASCII file, which contains the data set,
       arranged in rows and columns.
       This is a not standard file structure, which is currently used
       to store data, in order to be compatible on several OS.
       As to .def file structure, see @{"openmatfile()" Link "openmatfile()"}.

@{b}   INPUTS@{ub}
       file   - pointer to the string filename. Any name will succeed,
                not depending on the kind of extension. See instead
                @{"file2matrix()" Link "file2matrix()"} assumptions. Generally used with a .exp
                file.
       fx     - number of fields in the file.
       Xmat   - pointer to the data matrix.
       N      - array of selected columns indexes. NULL if all columns.
       Ndim   - number of selected columns. 0 if all columns.
       op     - which column you wish to put to a constant. 0 if none.
       opval  - the constant itself. It has no meaning if op=0.

@{b}   RESULT@{ub}
       success - TRUE if succesful, FALSE otherwise.

@{b}   EXAMPLE@{ub}
	success = matinp(file,DField,fx,Xmat,N,Ndim,op,opval);

@{b}   NOTES@{ub}
       This is a low level input function. Use it carefully.
	
@{b}   DEBUG@{ub}
       Use the macro MatInp. Not already active.

@{b}   BUGS@{ub}
       Max Data lenght is 255 characters, while max number of data
       fields is 100. Unpredictable errors will occur when these
       values are exceded.
       Problems also in floating point input. No problem with long
       numbers input.

@{b}   SEE ALSO@{ub}
       @{"openmatfile()" Link "openmatfile()"}, @{"file2matrix()" Link "file2matrix()"}, @{"choosematvar()" Link "choosematvar()"}.

@EndNode

@Node "matinv()" "AMTieee.library/matinv"

@{b}   NAME@{ub}
	matinv -- Computes the Inverse Matrix, by means of Gauss-Jordan 
	Method.

@{b}   SYNOPSIS@{ub}
	det = matinv( amt, bmt )
	D0	      A0   A1
 
	double matinv(struct matrix *amt,struct matrix *bmt);

@{b}   FUNCTION@{ub}
	The Inverse of a square matrix A is the matrix A_ that multiplied
	by A gives the unitary matrix I, i.e. the matrix where all values
	are worth 0, except for the principal diagonal, where the elements
	are worth 1.
	If

		I = A*A_;

	then multiplying on the right side by A in both members, we have:

		I*A = A = (A*A_)*A = A*(A_*A) ==> A_*A = I;

	So the Inverse works as well on the left as well on the right side.
	In other terms, multiplying A and A_ ROW x COL or COL x ROW, we 
	get always the same result.
	
	Algebraic Equation Systems can be easily solved by means of the
	Inverse computation. Known terms can be gathered together in a 
	vector, and dealing with different equation sets, all terms can
	be listed in a set of several known terms vectors, i.e. a matrix.
	Giving the bmt matrix, the function solves as many equation
	sets as many columns are given.

@{b}   INPUTS@{ub}
	amt - the coefficients matrix pointer.
	bmt - the Known terms and solutions matrix pointer.

@{b}   RESULT@{ub}
	det - the determinant of amt.

@{b}   EXAMPLE@{ub}
	det = matinv(amt, bmt);

@{b}   NOTES@{ub}
	must be a square matrix. From Linear Algebra, amt must be a not
	singolar matrix, i.e. the determinant must be different from 0.
	Really, the method is not reliable when the determinant is very
	near to zero, i.e. when the rank or characteristic dimension is
	less than the number of rows (rows=cols).
	
@{b}   DEBUG@{ub}
	Use the macro MatInv. Debug support not already active.
	You can check the function calling checkdim(amt,bmt,NULL,INV).

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
	@{"checkdim()" Link "checkdim()"}

@EndNode

@Node "matnorm()" "AMTieee.library/matnorm"

@{b}   NAME@{ub}
	matnorm -- computes the NORM of a symmetric matrix.

@{b}   SYNOPSIS@{ub}
	matnorm(amat, NA, ND)
	        A0    A1  A2

 
	void matnorm(struct matrix *amat, double *NA, double *ND);

@{b}   FUNCTION@{ub}
	Computes the NORM of a symmetric matrix. The Norm is defined
	as the sum of all squared elements. The Norm is an Invariant.
	When computing eigenvalues and eigenvectors, the sum of squared
	diagonal elements is the Norm. Comparing this last value and
	the Norm, you can have an index of the degree of gained
	approximation.

@{b}   INPUTS@{ub}
	amat - the symmetric matrix pointer.
	NA   - a pointer to the matrix Norm.
	ND   - a pointer to the sum of squared diagonal elements.

@{b}   RESULT@{ub}
	Nothing.

@{b}   EXAMPLE@{ub}
	matnorm(amat, NA, ND);

@{b}   NOTES@{ub}
	NA and ND are pointers and not double values.
	amat must be a square and symmetric matrix.
	
@{b}   DEBUG@{ub}
	Use the macro MatNorm.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
	@{"matavl()" Link "matavl()"}, @{"mattrace()" Link "mattrace()"}.

@EndNode

@Node "matper()" "AMTieee.library/matper"

@{b}   NAME@{ub}
	matper -- general matrix multiplication.

@{b}   SYNOPSIS@{ub}
	success = matper( amat, bmat, cmat)
	D0	          A0    A1    A2
 
	BOOL matper( struct matrix *, struct matrix *, struct matrix * );

@{b}   FUNCTION@{ub}
	Performes the matrix multiplication, using the stored 
	multiplying method. 

@{b}   INPUTS@{ub}
	amat - first factor.
	bmat - second factor.
	cmat - result of the operation. Must be different from first
              and second factor.

@{b}   RESULT@{ub}
	success - TRUE if successful, FALSE otherwise;

@{b}   EXAMPLE@{ub}
	success = matper( amat, bmat, cmat);

@{b}   NOTES@{ub}
	Depending on the choosen multiplying method, input matrix
	pointers may or not generate errors.
	
@{b}   DEBUG@{ub}
	Use the macro MatPer.

@{b}   BUGS@{ub}
	Never use the return value, when using the debug macro support.

@{b}   SEE ALSO@{ub}
	matrawcol(), @{"matpercol()" Link "matpercol()"}, @{"setmatperid()" Link "setmatperid()"}, @{"getmatperid()" Link "getmatperid()"}, @{"matpower()" Link "matpower()"}.

@EndNode

@Node "matpercol()" "AMTieee.library/matpercol"

@{b}   NAME@{ub}
	matpercol -- column x column matrix multiplication.

@{b}   SYNOPSIS@{ub}
	success = matpercol( amat, bmat, cmat)
	D0	             A0    A1    A2
 
	BOOL matpercol(struct matrix *, struct matrix *, struct matrix * );

@{b}   FUNCTION@{ub}
	Performes the matrix multiplication, using col x col method. 

@{b}   INPUTS@{ub}
	amat - first factor.
	bmat - second factor.
	cmat - result of the operation. Must be different from first
              and second factor.

@{b}   RESULT@{ub}
	success - TRUE if successful, FALSE otherwise;

@{b}   EXAMPLE@{ub}
	success = matpercol(amat, bmat, cmat);

@{b}   NOTES@{ub}
	
@{b}   DEBUG@{ub}
	Use the macro MatPerCol.

@{b}   BUGS@{ub}
	Never use the return value, when using the debug macro support.

@{b}   SEE ALSO@{ub}
	@{"matper()" Link "matper()"}, matrawcol(), @{"setmatperid()" Link "setmatperid()"}, @{"getmatperid()" Link "getmatperid()"}, @{"matpower()" Link "matpower()"}.

@EndNode

@Node "matplus()" "AMTieee.library/matplus"

@{b}   NAME@{ub}
	matplus -- Performes the matrix addition.

@{b}   SYNOPSIS@{ub}
	success = matplus( amat, bmat, cmat )
	D0                 A0    A1    A2
 
	BOOL matplus(
		struct matrix *amat,
		struct matrix *bmat,
		struct matrix *cmat);

@{b}   FUNCTION@{ub}
	Performes the matrix addition, i.e. each element of the result
	matrix is the sum of the corresponding ones of the two addenda.

@{b}   INPUTS@{ub}
	amat - first factor.
	bmat - second factor.
	cmat - result of the operation.

@{b}   RESULT@{ub}
	success - TRUE if successful, otherwise FALSE.

@{b}   EXAMPLE@{ub}
	success = matplus(amat, bmat, cmat);

@{b}   NOTES@{ub}

	
@{b}   DEBUG@{ub}
	Use the macro MatPlus.

@{b}   BUGS@{ub}
	Never use the return value, when using the debug macro support.

@{b}   SEE ALSO@{ub}
	@{"matsymm()" Link "matsymm()"}.

@EndNode

@Node "matpower()" "AMTieee.library/matpower"

@{b}   NAME@{ub}
	matpower -- 2nd power of a matrix.

@{b}   SYNOPSIS@{ub}
	success = matpower( amat, cmat)
	D0	             A0   A1
 
	BOOL matpower(struct matrix *, struct matrix * );

@{b}   FUNCTION@{ub}
	Performes the 2nd power of a matrix, i.e. a matrix  multiplication
	of the same matrix, using col x col method. 

@{b}   INPUTS@{ub}
	amat - first factor.
	cmat - result of the operation.

@{b}   RESULT@{ub}
	success - TRUE if successful, FALSE otherwise;

@{b}   EXAMPLE@{ub}
	success = matpower(amat, cmat);

@{b}   NOTES@{ub}
	
@{b}   DEBUG@{ub}
	Use the macro MatPower.

@{b}   BUGS@{ub}
	Never use the return value, when using the debug macro support.

@{b}   SEE ALSO@{ub}
	@{"matper()" Link "matper()"}, matrawcol(), @{"matpercol()" Link "matpercol()"}, @{"setmatperid()" Link "setmatperid()"}, @{"getmatperid()" Link "getmatperid()"}.

@EndNode

@Node "matprint()" "AMTieee.library/matprint"

@{b}   NAME@{ub}
	matprint -- terminal-format matrix output.

@{b}   SYNOPSIS@{ub}
	matprint( str, A )
	           A0  A1
 
	void matprint( char *, struct matrix * );

@{b}   FUNCTION@{ub}
	Reads the terminal dimensions and prints out a series of pieces
	of the input matrix, so that they fit into the given dimensions.

@{b}   INPUTS@{ub}
	str - just a comment you want to add.
	A   - the matrix pointer.

@{b}   RESULT@{ub}
	Nothing.

@{b}   EXAMPLE@{ub}
	matprint(str, A);

@{b}   NOTES@{ub}
	Use @{"matrawprint()" Link "matrawprint()"}, if you want a simple matrix printout.
	
@{b}   DEBUG@{ub}
       Use the macro MatPrint. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
	@{"matrawprint()" Link "matrawprint()"}, @{"setterm()" Link "setterm()"}, @{"printusing()" Link "printusing()"}, @{"getformat()" Link "getformat()"}.

@EndNode

@Node "matrandom()" "AMTieee.library/matrandom"

@{b}   NAME@{ub}
	matrandom -- random numbers matrix input.

@{b}   SYNOPSIS@{ub}
	success = matrandom( amat, lo, hi  )
       D0                   A0    D0  D1
 
	BOOL matrandom(struct matrix *amat, long lo, long hi);

@{b}   FUNCTION@{ub}
       Fills a matrix with random numbers. It uses the external
       seed, which is automatically set while opening the library.

@{b}   INPUTS@{ub}
       amat - the pointer to the matrix you wanto to fill.
       lo   - the lower limit of the range.
       hi   - the upper limit of the range.

@{b}   RESULT@{ub}
       success - TRUE if successful, otherwise FALSE.

@{b}   EXAMPLE@{ub}
	success = matrandom(amat, lo, hi);

@{b}   NOTES@{ub}
       In a range higher limit must be greater than lower one.
	
@{b}   DEBUG@{ub}
       Use the macro MatRandom. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
       @{"getseed()" Link "getseed()"}.

@EndNode

@Node "matrawprint()" "AMTieee.library/matrawprint"

@{b}   NAME@{ub}
	matrawprint -- raw matrix output.

@{b}   SYNOPSIS@{ub}
	matrawprint( str, A )
	              A0  A1
 
	void matrawprint( char *, struct matrix * );

@{b}   FUNCTION@{ub}
	Prints out the matrix as a table. It is up to you to check
	the dimensions of the display window.

@{b}   INPUTS@{ub}
	str - just a comment you want to add.
	A   - the matrix pointer.

@{b}   RESULT@{ub}
	Nothing.

@{b}   EXAMPLE@{ub}
	matrawprint(str, A);

@{b}   NOTES@{ub}
	Use @{"matprint()" Link "matprint()"}, if you want a terminal-formatted matrix printout.
	
@{b}   DEBUG@{ub}
       Use the macro MatRawPrint. Not already active.

@{b}   BUGS@{ub}
	You must check the dimensions of the display window..

@{b}   SEE ALSO@{ub}
	@{"matprint()" Link "matprint()"}, @{"setterm()" Link "setterm()"}, @{"printusing()" Link "printusing()"}, @{"getformat()" Link "getformat()"}.

@EndNode

@Node "matrowcol()" "AMTieee.library/matrowcol"

@{b}   NAME@{ub}
	matrowcol -- row x column matrix multiplication.

@{b}   SYNOPSIS@{ub}
	success = matrowcol( amat, bmat, cmat)
	D0	             A0    A1    A2
 
	BOOL matrawcol(struct matrix *, struct matrix *, struct matrix * );

@{b}   FUNCTION@{ub}
	Performes the matrix multiplication, using row x col method. 

@{b}   INPUTS@{ub}
	amat - first factor.
	bmat - second factor.
	cmat - result of the operation. Must be different from first
              and second factor.

@{b}   RESULT@{ub}
	success - TRUE if successful, FALSE otherwise;

@{b}   EXAMPLE@{ub}
	success = matrawcol(amat, bmat, cmat);

@{b}   NOTES@{ub}
	
@{b}   DEBUG@{ub}
	Use the macro MatRowCol.

@{b}   BUGS@{ub}
	Never use the return value, when using the debug macro support.

@{b}   SEE ALSO@{ub}
	@{"matper()" Link "matper()"}, @{"matpercol()" Link "matpercol()"}, @{"setmatperid()" Link "setmatperid()"}, @{"getmatperid()" Link "getmatperid()"}, @{"matpower()" Link "matpower()"}.

@EndNode

@Node "matscal()" "AMTieee.library/matscal"

@{b}   NAME@{ub}
	matscal -- Scalar x matrix multiplication.

@{b}   SYNOPSIS@{ub}
	matscal( amat, Val )
		 A0    D0
 
	void matscal(struct matrix *amat,double Val);

@{b}   FUNCTION@{ub}
	Multiplies by Val all elements of the matrix.

@{b}   INPUTS@{ub}
	amat - the matrix pointer.
	Val  - the scalar.

@{b}   RESULT@{ub}
	Nothing.

@{b}   EXAMPLE@{ub}
	matscal(amat,Val);

@{b}   NOTES@{ub}
	
@{b}   DEBUG@{ub}
	Use the macro MatScal. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}

@EndNode

@Node "matstd()" "AMTieee.library/matstd"

@{b}   NAME@{ub}
	matstd -- Matrix data statistics and standardization.

@{b}   SYNOPSIS@{ub}
	matstd( Amat, Mmat, SSmat, S2mat, stand, standgl)
		A0    A1    A2     A3     D0     D1
 
	void matstd(
		struct matrix *Amat,
		struct matrix *Mmat,
		struct matrix *SSmat,
		struct matrix *S2mat,
		BOOL stand,
		BOOL standgl);

@{b}   FUNCTION@{ub}
	In your data matrix you can consider each column as a variable
	and each row as a set of measures on an individual. So this
	function computes the mean, the variance and the standard 
	deviation of each column. The mean vector is practically a
	one-column matrix and the same happens for variance and standard
	deviation vectors.
	While computing the standard deviation, you can use the division
	by N (population standard deviation) or by N-1 (sample standard
	deviation). The choise is guided by the <standgl> flag.
	In addition, you can transform your data in standard variables,
	i.e. in variables with mean 0 and standard deviation 1. This 
	transformation, required by many statistical methods, can be
	accomplished setting the <stand> flag.

@{b}   INPUTS@{ub}
	Amat    - the data matrix pointer.
	Mmat    - the mean vector pointer.
	SSmat   - the standard deviation vector pointer.
	S2mat   - the variance vector pointer.
	stand   - set it to TRUE, if you want standardization.
	standgl - set it to TRUE, if you want to divide by N-1, instead
	of N.

@{b}   RESULT@{ub}
	Nothing.

@{b}   EXAMPLE@{ub}
	matstd(Amat, Mmat, SSmat, S2mat, stand, standgl);

@{b}   NOTES@{ub}
	Mean, Variance and Standard Deviation are of course values of
	the original variables. For the standardized variables Mean is
	worth 0, while Variance and Standard Deviation are worth 1.
	
@{b}   DEBUG@{ub}
	Use the macro MatStd. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}

@EndNode

@Node "matsymm()" "AMTieee.library/matsymm"

@{b}   NAME@{ub}
	matsymm -- Builds two matrix factors, a symmetric and an
	antisymmetric one, whose sum is the orginal matrix.

@{b}   SYNOPSIS@{ub}
	success = matsymm( amat, Symm, Anti )
	D0	           A0    A1    A2
 
	BOOL matsymm(
		struct matrix *amat,
		struct matrix *Symm,
		struct matrix *Anti);

@{b}   FUNCTION@{ub}
	Builds two matrix factors, a symmetric and an antisymmetric
	one, whose sum is the original matrix.
	The symmetric factor is the sum (divided by two) of the original
	and of the transposed matrix. The antisymmetric factor comes out
	from the analogous subtraction.
	The transposed matrix is consistent with the addition operation
	only if the original matrix is a square one.

@{b}   INPUTS@{ub}
	amat - the original matrix pointer.
	Symm - the symmetric matrix pointer.
	Anti - the antisymmetric matrix pointer.

@{b}   RESULT@{ub}
	success - TRUE if successful, FALSE otherwise;

@{b}   EXAMPLE@{ub}
	success = matsymm(amat, Symm, Anti);

@{b}   NOTES@{ub}
	amat must be a square matrix.

@{b}   DEBUG@{ub}
	Use the macro MatSymm.

@{b}   BUGS@{ub}
	Never use the return value, when using the debug macro support.

@{b}   SEE ALSO@{ub}
	@{"matplus()" Link "matplus()"}.

@EndNode

@Node "mattrace()" "AMTieee.library/mattrace"

@{b}   NAME@{ub}
	mattrace -- computes the matrix trace.

@{b}   SYNOPSIS@{ub}
	tr = mattrace( amat )
	D0		 A0
 
	double mattrace( struct matrix *amat );

@{b}   FUNCTION@{ub}
	Returns the sum of the diagonal elements.

@{b}   INPUTS@{ub}
	amat - the matrix pointer.

@{b}   RESULT@{ub}
	tr - The trace value.

@{b}   EXAMPLE@{ub}
	tr = mattrace(amat);

@{b}   NOTES@{ub}
       Must be a square matrix.
	
@{b}   DEBUG@{ub}
	Use the macro MatTrace. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
	@{"matnorm()" Link "matnorm()"}.

@EndNode

@Node "mattransform()" "AMTieee.library/mattransform"

@{b}   NAME@{ub}
	mattransform -- Matrix data transformation.

@{b}   SYNOPSIS@{ub}
	mattransform( amat, op, opval, Logh, corr)

 
	void mattransform(
		struct matrix *amat,
		UWORD op,
		double opval,
		BOOL Logh,
		double corr);

@{b}   FUNCTION@{ub}
	This function performes the data transformation, according to
	the function set by means of @{"settransform()" Link "settransform()"}. You can choose to
	have a column set to a constant and to switch on or off the
	transformation. In addition, you can set a correction value,
	i.e. for logarithmic transformation corr can be 1, so all
	positive values will also be transformed into positive numbers.
	Note that for real numbers all values must be positive, in order
	to have a logarithm. Default function is just log.

@{b}   INPUTS@{ub}
	amat  - the orginal data matrix pointer.
	op    - the column you want to be constant, otherwise 0.
	opval - the constant, valid only if op <> 0.
	Logh  - set to TRUE, if you want the transformation.
	corr  - this is a correction value.

@{b}   RESULT@{ub}
	Nothing.

@{b}   EXAMPLE@{ub}
	mattransform(amat, op, opval, Logh, corr);

@{b}   NOTES@{ub}
	Check the range of the transformation function against the data.
	
@{b}   DEBUG@{ub}
	Use the macro MatTransform. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
	@{"settransform()" Link "settransform()"}.

@EndNode

@Node "mattrs()" "AMTieee.library/mattrs"

@{b}   NAME@{ub}
	mattrs -- transposed matrix.

@{b}   SYNOPSIS@{ub}
	success = mattrs( amat, bmat )
	D0	          A0    A1
 
	BOOL mattrs(struct matrix *amat,struct matrix *bmat);

@{b}   FUNCTION@{ub}
	Copies the original matrix in a transposed one. The two args
	must be consistent, i.e. MxN -> NxM.

@{b}   INPUTS@{ub}
	amat - the original matrix pointer.
	bmat - the transposed matrix pointer.

@{b}   RESULT@{ub}
	success - TRUE if successful, otherwise FALSE.

@{b}   EXAMPLE@{ub}
	success = mattrs(amat, bmat);

@{b}   NOTES@{ub}
	
@{b}   DEBUG@{ub}
	Use the macro MatTrs.

@{b}   BUGS@{ub}
	Never use the return value, when using the debug macro support.

@{b}   SEE ALSO@{ub}
	@{"mattrsrd()" Link "mattrsrd()"}.

@EndNode

@Node "mattrsrd()" "AMTieee.library/mattrsrd"

@{b}   NAME@{ub}
	mattrsrd -- transposed matrix on the same (square) matrix..

@{b}   SYNOPSIS@{ub}
	success = mattrsrd( amat )
	D0	            A0
 
	BOOL mattrsrd(struct matrix *amat);

@{b}   FUNCTION@{ub}
	Builds the transposed matrix swapping opposite diagonal elements.
	In order to have a principal diagonal, must be a square matrix.

@{b}   INPUTS@{ub}
	amat - the original matrix pointer.

@{b}   RESULT@{ub}
	success - TRUE if successful, otherwise FALSE.

@{b}   EXAMPLE@{ub}
	success = mattrsrd(amat);

@{b}   NOTES@{ub}
	
@{b}   DEBUG@{ub}
	Use the macro MatTrsRd.

@{b}   BUGS@{ub}
	Never use the return value, when using the debug macro support.

@{b}   SEE ALSO@{ub}
	@{"mattrs()" Link "mattrs()"}.

@EndNode

@Node "matzer()" "AMTieee.library/matzer"

@{b}   NAME@{ub}
	matzer -- Loads zero values in all matrix elements.

@{b}   SYNOPSIS@{ub}
	matzer( amat )
	        A0
 
	void matzer(struct matrix *amat);

@{b}   FUNCTION@{ub}
	Loads zero values in all matrix elements.

@{b}   INPUTS@{ub}
	amat - the matrix pointer.

@{b}   RESULT@{ub}
	Nothing.

@{b}   EXAMPLE@{ub}
	matzer(amat);

@{b}   NOTES@{ub}

@{b}   DEBUG@{ub}
	Use the macro MatZer. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
	@{"mateq()" Link "mateq()"}, @{"matidn()" Link "matidn()"}, @{"matfuncnull()" Link "matfuncnull()"}, @{"matfuncidn()" Link "matfuncidn()"}, @{"matfunceq()" Link "matfunceq()"}.

@EndNode

@Node "openmatfile()" "AMTieee.library/openmatfile"

@{b}   NAME@{ub}
	openmatfile -- opens the data file header.

@{b}   SYNOPSIS@{ub}
	success = openmatfile( file, NField, NR, FX)
       D0                     A0    A1      A2  A3
 
	BOOL openmatfile(char *,char **,UWORD *,UWORD *);

@{b}   FUNCTION@{ub}
       Opens the data file header, which is a ASCII .def file.
       The header file contains info about the .exp file:
       -       NR: the number of records in the .exp file.
       -       NF: the number of fields int the .exp file
       -       NField[]: an array of NF field names.
       This is a not standard file structure, which is currently used
       to store data, in order to be compatible on several OS.
       As to ASCII .exp kind file, see @{"matinp()" Link "matinp()"}.

@{b}   INPUTS@{ub}
       file   - pointer to the string filename. Any name will succeed,
                not depending on the kind of extension. See instead
                @{"file2matrix()" Link "file2matrix()"} assumptions. Must be used with a .def
                kind file.
       NField - the array of field names.
       NR     - a pointer to the number of records in the file.
       FX     - a pointer to number of fields in the file.

@{b}   RESULT@{ub}
       success - TRUE if successful, FALSE otherwise.

@{b}   EXAMPLE@{ub}
	success = openmatfile(file, NField, NR, FX);

@{b}   NOTES@{ub}
       Also if extension can be different or absent, this function
       must be used to open a ASCII .def kind file.
	
@{b}   DEBUG@{ub}
       Use the macro OpenMatFile. Not already active.

@{b}   BUGS@{ub}
       Max allowed number of fields is 100. The limit will be not active
       using this function, but will jump out later, using @{"matinp()" Link "matinp()"}.
       Max number of allowed records is 65535, according to UWORD type.

@{b}   SEE ALSO@{ub}
       @{"choosematvar()" Link "choosematvar()"}, @{"matinp()" Link "matinp()"}, @{"file2matrix()" Link "file2matrix()"}.

@EndNode

@Node "printusing()" "AMTieee.library/printusing"

@{b}   NAME@{ub}
	printusing -- sets data format for int and float.

@{b}   SYNOPSIS@{ub}
	printusing( intdgt, floatdgt )
		    D0      D1
 
	void printusing( UWORD, UWORD );

@{b}   FUNCTION@{ub}
	This is an analogous of the BASIC printusing function. It sets
	the number of int and float digits in the output to stdout.
	It does not fix the precision of the computation.

@{b}   INPUTS@{ub}
	intdgt   - number of int digits.
	floatdgt - number of float digits.

@{b}   RESULT@{ub}
	Nothing.

@{b}   EXAMPLE@{ub}
	printusing(intdgt, floatdgt);

@{b}   NOTES@{ub}
       This is a floating point library, but the capability of setting
       int format works also for internal int use. 
	
@{b}   DEBUG@{ub}
	Use PrintUsing macro. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
	@{"setprecision()" Link "setprecision()"}, @{"getprecision()" Link "getprecision()"}, @{"getepsilon()" Link "getepsilon()"}, getformat.

@EndNode

@Node "setiterations()" "AMTieee.library/setiterations"

@{b}   NAME@{ub}
	setiterations -- sets the desired computing iterations.

@{b}   SYNOPSIS@{ub}
	setiterations( loops )
                      D0
 
	void setiterations( int );

@{b}   FUNCTION@{ub}
       Some functions in the library require a iterative approach.
       While it is possible to call recursively these functions,
       it si also possible to set the internal number of iterations.

@{b}   INPUTS@{ub}
       loops - the number of iterations a iterative process must
               perform before returning a value, if desired precision
               has not been gained.

@{b}   RESULT@{ub}
       Nothing.

@{b}   EXAMPLE@{ub}
	setiterations(loops);

@{b}   NOTES@{ub}
       Default value is 100 iterations.
	
@{b}   DEBUG@{ub}
       Use the macro SetIterations. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
       @{"matavl()" Link "matavl()"}, @{"getiterations()" Link "getiterations()"}.

@EndNode

@Node "setmatperid()" "AMTieee.library/setmatperid"

@{b}   NAME@{ub}
	setmatperid -- sets the desired matrix multiplication method.

@{b}   SYNOPSIS@{ub}
	setmatperid( perid )
                    D0
 
	void setmatperid( int );

@{b}   FUNCTION@{ub}
       Sets the kind of matrix multiplication: rows x columns, columns
       x columns, columns x rows, rows x rows.

@{b}   INPUTS@{ub}
       perid - the desired matrix multiplication method. It can be
               ROWCOL, COLCOL, COLROW, ROWROW. See @{"matper()" Link "matper()"} for the
               related info.

@{b}   RESULT@{ub}
       Nothing-

@{b}   EXAMPLE@{ub}
	setmatperid(perid);

@{b}   NOTES@{ub}
       Default multiplication is ROWCOL. After it is has been set in
       a different way, it will not be changed until you call again
       this function. Use it carefully, with a complete knowledge of
       what you are doing or want to do.
	
@{b}   DEBUG@{ub}
       Use the macro SetMatPerId. Not already active.

@{b}   BUGS@{ub}
       That is not a bug, only a programmer fault: three matrix which
       are consistent for a kind of multiplication are generally not
       consistent for another kind of multiplication

@{b}   SEE ALSO@{ub}
       @{"matper()" Link "matper()"}, @{"getmatperid()" Link "getmatperid()"}.

@EndNode

@Node "setprecision()" "AMTieee.library/setprecision"

@{b}   NAME@{ub}
	setprecision -- sets the desired computing precision.

@{b}   SYNOPSIS@{ub}
	setprecision( delta )
		      D0
 
	setprecision( delta );

@{b}   FUNCTION@{ub}
	Sets the desired computing precision. Totally different from
	output format.

@{b}   INPUTS@{ub}
	delta - the required precision. Cannot be lower than machine
	        epsilon.

@{b}   RESULT@{ub}
	Nothing.

@{b}   EXAMPLE@{ub}
	setprecision(delta);

@{b}   NOTES@{ub}
	
@{b}   DEBUG@{ub}
	Use the macro SetPrecision. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
	@{"getprecision()" Link "getprecision()"}, @{"getepsilon()" Link "getepsilon()"}.

@EndNode

@Node "setterm()" "AMTieee.library/setterm"

@{b}   NAME@{ub}
	setterm -- sets terminal rows and cols.

@{b}   SYNOPSIS@{ub}
	success = setterm( termcols, termrows )
       D0                 D0        D1
 
	BOOL setterm( UWORD, UWORD );

@{b}   FUNCTION@{ub}
       sets terminal rows and cols for formatted output in @{"matprint()" Link "matprint()"}.

@{b}   INPUTS@{ub}
       termcols - the number of terminal cols.
       termrows - the number of terminal rows.

@{b}   RESULT@{ub}
       success - TRUE if successful, otherwise FALSE.

@{b}   EXAMPLE@{ub}
	success = setterm(termcols, termrows);

@{b}   NOTES@{ub}
	
@{b}   DEBUG@{ub}
       Use the macro SetTerm. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
       @{"matprint()" Link "matprint()"}, @{"matrawprint()" Link "matrawprint()"}.

@EndNode

@Node "settransform()" "AMTieee.library/settransform"

@{b}   NAME@{ub}
	settransform -- sets the matransform internal function.

@{b}   SYNOPSIS@{ub}
	settransform( p )
		      A0
 
	void settransform(double (*)(double));

@{b}   FUNCTION@{ub}


@{b}   INPUTS@{ub}
	p - the pointer to the function which returns a double, that
           you want to link to @{"mattransform()" Link "mattransform()"}.

@{b}   RESULT@{ub}
	Nothing.

@{b}   EXAMPLE@{ub}
	settransform(p);

@{b}   NOTES@{ub}
	
@{b}   DEBUG@{ub}
	Use the macro SetTransform. Not already active.

@{b}   BUGS@{ub}
	There are no errors. Errors can appear in @{"mattransform()" Link "mattransform()"},depending
	on the function you set and on the data matrix.
	
@{b}   SEE ALSO@{ub}
	@{"mattransform()" Link "mattransform()"}.

@EndNode

@Node "swap()" "AMTieee.library/swap"

@{b}   NAME@{ub}
	swap -- Math utility, to swap to double numbers

@{b}   SYNOPSIS@{ub}
	swap( px, py )
	      A0  A1
 
	void swap( double *, double * );

@{b}   FUNCTION@{ub}
	This function is taken almost integrally from K&R C-Manual.

@{b}   INPUTS@{ub}
	px, py - two double pointers.

@{b}   RESULT@{ub}
	Nothing

@{b}   EXAMPLE@{ub}
	swap(px,py);

@{b}   NOTES@{ub}
	Only double digits.
	
@{b}   DEBUG@{ub}
	Use the macro Swap. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}

@EndNode

@Node "getprecision()" "AMTieee.library/getprecision"

@{b}   NAME@{ub}
	getlastprecision -- reads the precision get in the last
       iterative computing operation.

@{b}   SYNOPSIS@{ub}
	precision = getlastprecision()
       D0
 
	double getlastprecision( void );

@{b}   FUNCTION@{ub}
       Reads the precision get in the last iterative computing operation.
       Reading this result you can decide going on computing or stopping.

@{b}   INPUTS@{ub}
       Nothing.

@{b}   RESULT@{ub}
       precision - the last computing precision.

@{b}   EXAMPLE@{ub}
	precision = getlastprecision();

@{b}   NOTES@{ub}
       Do not confuse last precision, computing precision, machine
       epsilon and output format.
	
@{b}   DEBUG@{ub}
       Use the macro GetLastPrecision. Not already active.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}
       @{"setprecision()" Link "setprecision()"}, @{"getepsilon()" Link "getepsilon()"}, @{"getepsilon()" Link "getepsilon()"},
       @{"printusing()" Link "printusing()"}, @{"getformat()" Link "getformat()"}.

@EndNode

