LazStats: Refactor ChiSqrUnit.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7805 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2020-10-26 00:18:22 +00:00
parent bd9d5086b8
commit fb531ea79d
2 changed files with 389 additions and 241 deletions

View File

@ -14,6 +14,8 @@ type
TDblMatrix = DblDyneMat;
TDblVector = DblDyneVec;
TIntMatrix = IntDyneMat;
EMatrix = class(Exception);
// Vectors
@ -79,6 +81,7 @@ function MatNumRows(A: TDblMatrix): Integer;
function MatRowMeans(A: TDblMatrix): TDblVector;
function MatRowVector(A: TDblMatrix; ARowIndex: Integer): TDblVector;
procedure MatSize(A: TDblMatrix; out n, m: Integer);
procedure MatSize(A: TIntMatrix; out n, m: Integer);
function MatTransposed(A: TDblMatrix): TDblMatrix;
function SubMatrix(A: TDblMatrix; i1,j1, i2,j2: Integer): TDblMatrix;
@ -699,6 +702,13 @@ begin
end;
procedure MatSize(A: TIntMatrix; out n, m: Integer);
begin
n := Length(A);
m := Length(A[0]);
end;
function MatTransposed(A: TDblMatrix): TDblMatrix;
var
n, m, i, j: Integer;