Matrix Library

© Anton Voronin (, 1996-1997

This library lets to manipulate matrices and vectors. To use it you have to include its header file matrix.h. It defines the base class MATRIX and derived class VECTOR.

Class MATRIX comtains the following methods:

Class VECTOR has additional methods: You can create MATRIX or VECTOR object either by initializing it with another object:
	MATRIX m1=m2;
	VECTOR v1=v2;
	MATRIX m3=v1;	// creates single-column matrix from the vector
	VECTOR v3=m1;	// if m1 consist of a single column or a single row,
			// creates vector from it, else generates error
	double num=12345.6578;
	MATRIX m1=num;	// creates 1x1 matrix and assigns the value of number
			// to its only element
or without initialization, by only specifying number of cols and rows for MATRIX object or vector length for VECTOR object:
	MATRIX m1(10,15);
	VECTOR v1(8);
You can also use the following type casting operations: The program that wants to use this library has to define the following functions: