Matrix documentation
--------------------

Description
-----------

Matrix is set of simple classes used to powerful building Matrix based
oprations with various elements. Currently simple numbers, ratios, complex
and real numbers are supported. Each of this type can be member of Matrix
and used for common numeric Matrix opration counting.

Inheritance schema
------------------

base
+ class Element
   + class Ratio
   + class Real 
   + class Complex
   + class Matrix
+ class Number

Class identifying
-----------------

Every object as an instance of one from Matrix classes can report its class
membership via public `getClass()' method.  Returning type is `enum
matrix_class' and it unique per class.  See `classes.h' file for more
information about class indentifying.

Elements
--------

Element class is base (core) for Ration, Real, Complex and Matrix classes.
Direct inheritance is used. In number class is no direct inheritance used,
although composition of Element class instance (object) is used. It is
provided as private member.

All these classes provides wide set of constructors for element
initialization. Please refer to particular header files (element.h, real.h,
complex.h, ratio.h, matrix.h and also number.h) for more information.

Every class has get* methods for private data retrieving. In example in
Complex class there is `getReal()' method for real part of complex number
and `getImaginary()' method for imaginary part of complex number. Special
case is `getNum()', which will count one number for whole object.

There are also `toStream()' methods for every class to print infomation to
given stream. Note that Matrix class will print whole matrix also with
information about count of rows and colums. There is also `copy()' method
for each class to get exact copy of appropriate object.

Matrix oprations
----------------

Probably the most interest class from set is Matrix. It provides various
matrix specific operations with Matrix elements. They are:

	* matrix count '+'
	* matrix difference '-'
	* unary '-'
	* matrix multiplication '*'
	* scalar multiplication
	* determinant counting
	* matrix inversion

The first four opeation are implemented via overloaded particular operator
(+, -, *). Scalar multiply is provided by `scalarMultiply()' method.
Determinant is counted by `determinant()' method. Note that only for NxN
type matrixes are possible to count determinant. The last one, inversion
operation is by `inversion()' method provided.

Main program
------------

Here are some commands from `main()' function described, as an examples for
better understanding:

	Matrix vector1(3); // creating vector 3x1; members are set to 0
	Matrix vector2(1, 3, Complex(1, 2)); // 1x3, members are complex 1 + 2i
	Matrix matrix1("I", 3); // matrix 3x3; diagonal members set to C true (1)

	Matrix matrix2 = matrix1; // constructor copy (matrix2 is now copy of 1)

	matrix2(1, 1) = Ratio(1, 2); // setting up particular matrix members
	matrix2(1, 2) = 85.3f;       // in human understandable forms; they are
	matrix1(1, 3) = matrix2(1, 3) = Complex(2.1f, 3.3f); // counted from 1

	Matrix matrix3 = matrix2 * matrix1; // matrix multiply

	cout << matrix3.determinant() << endl; // determinant counting and printing

Conclusion
----------

Developed by Ondrej Jombik <nepto@pobox.sk>
Copyright (c) 2002 Platon SDG, http://www.platon.sk/

Inspiration comes from various resources, mainly from similar already
finished projects. Algorithms wanted to be speed optimized. Register
variables used, encapsulation principles are followed strictly.

Comments, suggestions, bug reports and patches are always welcome.
Please e-mail them to the following address: <platon@pobox.sk>

The latest official release of Matrix is available from:
http://www.platon.sk/projects/ or http://www.nepto.sk/school/

This document was written by Ondrej Jombik in 29th May 2002.

