i, j]);; TMatrix.LoadFromFile (FName: string);, j : Integer;: TextFile; (F, FName); (F); i: = 0 to N - 1 doj: = 0 to N - 1 do (F, Matrix [i, j]);; (F);; (F);; TMatrix.Add (M2: Tmatrix): TMatrix;, j: Integer;: TMatrix;: = TMatrix.Create (Self);. Init (Razmer);
i: = 0 to N-1 doj: = 0 to N-1 do.Matrix [i, j]: = Matrix [i, j] + M2.Matrix [i, j]; ;
: = Msum;; TMatrix.Sub (M2: Tmatrix): TMatrix;: TMatrix;, j: Integer;: = TMatrix.Create (Self);. Init (Razmer);
i: = 0 to N-1 doj: = 0 to N-1 do.Matrix [i, j]: = Matrix [i, j] - M2.Matrix [i, j]; ;: = M;; TMatrix.Mult (M2: Tmatrix): TMatrix;: TMatrix;, j, k: Integer;
: = TMatrix.Create (Self);. Init (M2.Razmer);
i: = 0 to M2.Razmer - 1 doj: = 0 to M2.Razmer - 1 dok: = 0 to M2.Razmer - 1 do.Matrix [i, j]: = M. Matrix [i, j] + Self.Matrix [i, k] * M2.Matrix [k, j];;;;
: = M;; TMatrix.NumMul (Num: Real): TMatrix; i, j: Integer;: TMatrix;: = TMatrix (Self);. Init (Razmer);
i: = 0 to N-1 doj: = 0 to N-1 do.Matrix [i, j]: = Num * Matrix [i, j];;;
: = M;
; TMatrix.Transp: TMatrix;: TMatrix;, j: Integer;: = TMatrix.Create (Self);. Init (Razmer);
i: = 0 to Razmer - 1 doj: = 0 to Razmer - 1 do.Matrix [i, j]: = Matrix [j, i];;;
: = M;
//; TMatrix.Exchange_line (Nfirst, Nsecond: Integer);: Real;: Integer;
i: = 0 to Razmer -1 do begin: = Matrix [Nfirst, i]; [Nfirst, i]: = Matrix [Nsecond, i]; [Nsecond, i]: = temp; ;; TMatrix.getMatrix (M: TMatrix; Row, Col: Integer): TMatrix;: TMatrix;, j: Integer;, jj: Integer;: = TMatrix.Create (nil);. Init (M.Razmer - 1) ;: = 0; jj: = 0; i: = 0 to Res.Razmer - 1 doi> = Row then ii: = i + 1 else ii: = i; j: = 0 to Res.Razmer - 1 doj> ; = Col then jj: = j + 1 else jj: = j;. Matrix [i, j]: = M.Matrix [ii, jj];;;: = Res;; TMatrix.Det (M: TMatrix): Real;, j, znak: Integer; M.Razmer = 1Result: = M.Matrix [1,1] M.Razmer = 2 then Result: = M.Matrix [0,0] * M.Matrix [1,1] - M.Matrix [0,1] * M.Matrix [1,0] for i: = 0 to M.Razmer -1 do beginOdd (i +1) then znak: = -1 else znak: = 1;: = Result + znak * M.Matrix [i, 1] * Self.Det (M.getMatrix (M, i, 1));;
;; TMatrix.Obrat (): TMatrix;, Temp: TMatrix;, j, k: Integer;, koefStr: Real;: = TMatrix.Create (Self);. Init (Self.Razmer ); i: = 0 to dop.Razmer - 1 doj: = 0 to dop.Razmer - 1 do begin (i <> j) then dop.Matrix [i, j]: = 0dop.Matrix [i, j ]: = 1;;;: = TMatrix.Create (self);. Init (Razmer); i: = 0 to Razmer -1 doj: = 0 to Razmer - 1 do.Matrix [i, j]: = Matrix [ i, j]; i: = 0 to Razmer - 2 doTemp.Matrix [i, i] = 0 then.Exchange_line (i, i +1);. Exchange_line (i, i +1);;: = Temp.Matrix [i, i]; j: = 0 to Razmer - 1 do.Matrix [i, j]: = Temp.Matrix [i, j]/koef;. Matrix [i, j]: = dop.Matrix [i, j]/k...