Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
диссер.docx
Скачиваний:
0
Добавлен:
01.07.2025
Размер:
526.69 Кб
Скачать

Қосымшаның жалғасы

Memo1.Lines.Add('');

Memo1.Lines.Add('B базис матрицасы:');

Memo1.Lines.Add('');

for i:=0 to length(bzm)-1 do

begin

temp_str:='';

for j:=0 to length(bzm[i])-1 do

begin

bzm[i,j]:=main_mas[i,j];

temp_str:=temp_str+inttostr(bzm[i,j])+' ';

end;

memo1.lines.add(temp_str);

end;

///////////////--------------------------------------------------

setlength(temp_mas,length(main_mas)-length(bzm),length(bzm)+1);

for i:=0 to length(temp_mas)-1 do

begin

for j:=1 to length(temp_mas[i])-1 do

begin

sum:=0;

for k:=0 to length(bzm[0])-1 do

sum:=sum+power(main_mas[j-1,k],main_mas[i+length(bzm),k]);

temp_mas[i,j]:=sum;

end;

temp_mas[i,0]:=i+length(bzm)+1;

end;

////////////----------------------------------------------------

Memo1.Lines.Add('');

Memo1.Lines.Add('');

Memo1.Lines.Add('D=[d(r,i)] матрицасы');

Memo1.Lines.Add('');

temp_str:='r/i ';

for i:=0 to length(temp_mas[0])-1 do

temp_str:=temp_str+IntToStr(i+1)+' ';

Memo1.Lines.Add(temp_str);

temp_str:='____';

for i:=0 to length(temp_mas[0])-1 do

temp_str:=temp_str+'______';

Memo1.Lines.Add(temp_str);

for i:=0 to length(temp_mas)-1 do

begin

temp_str:='';

for j:=0 to length(temp_mas[i])-1 do

begin

temp_str:=temp_str+inttostr(temp_mas[i,j])+' ';

end;

Memo1.lines.Add(temp_str);

end;

/////////////---------------------------------------------------

Қосымшаның жалғасы

setlength(f_mas,length(main_mas)-length(bzm),3);

for i:=0 to length(f_mas)-1 do

begin

getminandindex(temp_mas,f_mas[i,0],f_mas[i,1],f_mas[i,2]);

if i<>length(f_mas)-1 then

temp_mas:=deleterow(temp_mas,f_mas[i,1]);

end;

Memo1.Lines.Add('');

Memo1.Lines.Add('');

Memo1.Lines.Add('Итерация k min d(r*,i*) r* i*');

Memo1.Lines.Add('______________________________________');

for i:=0 to length(f_mas)-1 do

begin

temp_str:=' k='+IntToStr(i+1)+' | ';

for j:=0 to length(f_mas[i])-1 do

temp_str:=temp_str+IntToStr(f_mas[i,j])+' ';

Memo1.Lines.Add(temp_str);

end;

////////////---------------------------------------------------

setlength(x_mas,length(bzm),length(main_mas));

for i:=0 to length(x_mas)-1 do

x_mas[i,i]:=1;

Memo1.Lines.Add('');

Memo1.Lines.Add('');

Memo1.Lines.Add('X матрицасы ');

Memo1.Lines.Add('');

temp_str:=' ';

for j:=0 to length(x_mas[0])-1 do

temp_str:=temp_str+inttostr(j+1)+' ';

Memo1.Lines.Add(temp_str);

temp_str:='';

for j:=0 to length(x_mas[0])-1 do

temp_str:=temp_str+'_______';

Memo1.Lines.Add(temp_str);

for i:=0 to length(x_mas)-1 do

begin

temp_str:=inttostr(i+1)+' | ';

for j:=0 to length(x_mas[i])-1 do

temp_str:=temp_str+inttostr(x_mas[i,j])+' ';

Memo1.Lines.Add(temp_str);

end;

for i:=0 to length(f_mas)-1 do

x_mas[f_mas[i,2]-1,f_mas[i,1]-1]:=1;

Memo1.Lines.Add('');

Memo1.Lines.Add('');

Memo1.Lines.Add('X матрицасы ');