class MAT_INTI |
---|
attr m:ARRAY{ARRAY{ET}}; .. Included as m |
---|
attr nc:INT; .. Included as nc |
---|
**** | column |
attr nr:INT; .. Included as nr |
---|
**** | row |
attr m:ARRAY{ARRAY{ET}}; .. Included as m |
---|
attr nc:INT; .. Included as nc |
---|
**** | column |
attr nr:INT; .. Included as nr |
---|
**** | row |
loop j::=jpiv.ind!; .. Included as iPivot |
---|
d1::=d; .. Included as jPivot |
---|
shared r_0:ET; .. Included as r_0 |
---|
shared r_1:ET; .. Included as r_1 |
---|
loop j::=jpiv.ind!; .. Included as iPivot |
---|
d1::=d; .. Included as jPivot |
---|
shared r_0:ET; .. Included as r_0 |
---|
shared r_1:ET; .. Included as r_1 |
---|
end; .. Included as CheckZero |
---|
det_primitive_r(0,jpiv,r_1); .. Included as SetPivot |
---|
d1:=d1.negate; .. Included as SetPivot |
---|
if q=r_1 then .. Included as SolveD |
---|
loop p0::=0.upto!(dim-1); .. Included as SolveH |
---|
**** | #OUT+"SolveD: p0="+p0.str+"\n"; |
break!; .. Included as SolveL |
---|
.. Included as SubC |
---|
end; .. Included as SubL |
---|
aget(i1:INT):ARRAY{ET} .. Included as aget |
---|
**** | The array with index `[i1]'. |
aget(i1,i2:INT):ET .. Included as aget |
---|
**** | The element with indices `[i1,i2]'. |
aset(i1:INT,val:ARRAY{ET}) .. Included as aset |
---|
**** | Set row with index `[i1]' to val. |
aset(i1,i2:INT,val:ET) .. Included as aset |
---|
**** | Set the element with indices `[i1,i2]' to val. |
clear .. Included as clear |
---|
.. Included as cofactor |
---|
**** | destructive |
col_mod(j:INT, n:INTI) |
---|
if j1=j2 then return; end; .. Included as col_plus_scaled_col |
---|
copy:SAME .. Included as copy |
---|
create(r,c:INT):SAME |
---|
create(r,c:INT, r_one:ET):SAME .. Included as create |
---|
**** | Create a matrix with r rows and c columns |
create(arg:SAME):SAME .. Included as create |
---|
**** | Creates a new matrix with the same dimensions. |
det:INTI |
---|
end; .. Included as det_p |
---|
strTeX:STR .. Included as det_primitive |
---|
has_ind(i,j:INT):BOOL .. Included as has_ind |
---|
**** | return (m.has_ind(i) and m[i].has_ind(j)); |
SubC(p0,i:INT) .. Included as initPivot |
---|
mat_fltd:MAT_FLTD |
---|
mat_rat:MAT_RAT |
---|
end; end; .. Included as minor |
---|
w:=m[i]; m[i]:=#(o.nr); .. Included as minor_matrix |
---|
res.m[i][j]:=r_0; .. Included as minor_matrix_column |
---|
end; .. Included as minor_matrix_row |
---|
m[i+r_ofs][j+c_ofs]:=m[i+r_ofs][j+c_ofs]-o.m[i][j]; .. Included as minus |
---|
.. Included as minus |
---|
**** | plus with offset. destructive. |
.. Included as minus |
---|
**** | destructive |
res.m[i][j]:=m[i][j]-o.m[i][j]; .. Included as minus_arg |
---|
return arr; .. Included as negate |
---|
end; .. Included as negate |
---|
.. Included as plus |
---|
**** | m[i0,*]=m[i0,*]+c*m[i1,*] |
end; .. Included as plus |
---|
res.m[i][j]:=m[i][j]+o.m[i][j]; .. Included as plus |
---|
end; .. Included as printRelation |
---|
resize(nr1,nc1:INT):SAME .. Included as resize |
---|
row_mod(i:INT, n:INTI) |
---|
.. Included as row_plus_scaled_row |
---|
res:SAME:=#(nr,nc-1,r_1); .. Included as str |
---|
sub_matrix(ci,cj:ARRAY{INT}):SAME .. Included as strTeX |
---|
**** | sub-matrix with combination(selection) ci[] for row {0..nr-1} and cj[] for column {0..nc-1} |
end; .. Included as str_array |
---|
if j/=jp then j1::=0.up!; .. Included as str_pmatrix |
---|
.. Included as sub_matrix |
---|
**** | remove row [ip]. |
.. Included as swap_col |
---|
**** | transpose |
.. Included as swap_col |
---|
end; end; .. Included as swap_row |
---|
.. Included as times |
---|
**** | | 0 0 E | -- rest |
end; .. Included as times |
---|
times(o:SAME):SAME .. Included as times |
---|
loop i::=0.upto!(nr-1); loop j::=0.upto!(nc-1); .. Included as times |
---|
.. Included as times_trans |
---|
**** | destructive self = self*(a,shift) the argument "a,shift" means: | E 0 0 | -- diagonal of size of "shift" | 0 a 0 | -- arg. | 0 0 E | -- rest |
w:ARRAY{ET}:=#(nc); .. Included as times_trans |
---|
w:SAME:=#(d.size.max(nr),d.size.max(nc)); .. Included as to_diagonal |
---|
clear; loop i::=d.ind!; m[i][i]:=d[i]; end; .. Included as to_unit |
---|
end; end; .. Included as trans |
---|
end; end; .. Included as trans |
---|
jpiv1::=jpiv.subarr(0,j); .. Included as SetPivot_set |
---|
str_pmatrix:STR .. Included as det_primitive_d |
---|
**** | TeX \pmatrix{ }. v:var name |
str_pmatrix:STR .. Included as det_primitive_d |
---|
**** | TeX \pmatrix{ }. v:var name |
s::=""; .. Included as det_primitive_r |
---|