program mat;

uses
	SysUtils, LibV in '..\..\Libv.pas';

{$APPTYPE CONSOLE}

var
	m,m2 : matrix_p;
	i,j,count : integer;
	
const
	dim = 200;

begin
	logStartConsoleLog;
	logUpperLevel(LOG_TRACE);
	
	m:=matAlloc(dim,dim);
	
	memPrintStats;
	
	count:=0;
	for i:=0 to dim-1 do
		for j:=0 to dim-1 do
		begin
			if i=j then
				m^.cell[i][j] := 1
			else
				m^.cell[i][j] := 100 * count;
			count:=count+1;
		end;
	count := timeTickCount;
	m2 := matInverse(m,false);
	count := timeTickCount - count;
	writeln('Inversed in ',count,' milliseconds');
	memFree(m2);
end.
