		Libmat.a

Introduction:
A matrix classlibrary for gcc(other C++ compilers may work too).
OBS! This is VERY beta it might not always work.

Copyright: GLPL(included)

Installation:
Copy matrix.h to gnu:lib/g++-include and the libs to gnu:lib.

Usage:
	gcc <what-ever-prog> -lmat -lm
or 
	gcc <what-ever-prog> -lmatC -lm
for dimension check.
or
	gcc <what-ever-prog> -lmatDC -lm
for dimensioncheck and function trace(in swedish:)).

Recompiling:

Just cd to the dir and type make(copy matrix.h to lib/g++-include first!).



Doc:
Operators and functions:
+ - * /
inv(A) :inverts the matrix A same as 1/A,det(A)!=0,dim(A)= nxn.
eigen(A) :Returns the eigenvalues for A,dim(A)=nxn.if A has complex eigenvalues this creates an 
infinit loop:-(.
solve(A,b): Solves the linear eq. A*x=b,dim(A)=nxn,Dim(b)=nx1.
LR(A,L,R) : L-R factors the matrix A.
e(n,x) :Returns a vector with dim nx1 with  a "1" in element  x. 
I(n) :Returns a matrix ,with dim nxn,with ones on the diagonal.
det(A):Returns the determinant for A,dim(A)=nxn.

Methods:
read: Reads a matrix from stdin.
print:prints a matrix to stdout.
ex:
	Matrix A(2,2);
	A.read(); // read a 2x2 matrix from stdin.
	A.print();// and print it.


Constructors:
Matrix(float **a,int x ,int y)
Matrix created with same coffs as a with dim x,y.

Matrix(int x,int y)
Creates a zeromatrix with dim x y.

Matrix(int x)
Creates a zeromatrix with dim x x.
Matrix(const Matrix &A)
Creates an identical copy of A.

Matrix(const Matrix &A,int x,int y)
Creates of copy of A with dim x y.

Matrix()
Creates an empty matrix.

Comments to:

Tommy Johansson
Stärng1 1 NB
72468 Västerås
Sweden

email: frv95tjn@mds.mdh.se
