Домой Классы Статические функции Перечисления (ENUM) Структуры (STRUCTURE)

{Cmatrix|_of_complex}


(включая защищенные члены)

CLASS {Cmatrix|_of_complex} , TESTED, OPERATORS, RECURSIVE:



IMPORT : {Complex} , {Cvector} , {Sorting} .

{Complex}.{complex} Items|_of_matrix[] , READ


INT NRows|_count , READ , INIT


INT NColumns|_count , READ , INIT


       

FUNCTION New_cmatrix (
     
INT Row|s_count ,
     
INT Col|umns_count ) ==> {Cmatrix} , NEW



FUNCTION New_cmatrix_from_v|ectors_array (
     
{Cvector} A|rray_of_vectors [*] ) ==> {Cmatrix} , NEW



FUNCTION New_cmatrix_2x2|_from_2_vectors (
     
{Cvector} A|_vector ,
     
{Cvector} B|_vector ) ==> {Cmatrix} , NEW



FUNCTION New_cmatrix_3x3|_from_3_vectors (
     
{Cvector} A|_vector ,
     
{Cvector} B|_vector ,
     
{Cvector} C|_vector ) ==> {Cmatrix} , NEW



FUNCTION Cidentity_2x2 ==> {Cmatrix} , NEW



FUNCTION Cidentity_3x3 ==> {Cmatrix} , NEW



FUNCTION Cidentity ( INT Size|_ncolumns_and_nrows ) ==> {Cmatrix} , NEW



--------------------------------------- 'access Items[] via .[i, j] method'

  

METHOD . [ INT I|ndex_from0 , INT J|ndex_from0 ] ==> {complex}



METHOD set_items (
     
INT I|ndex_of_row_from0 ,
     
INT J|ndex_of_column_from0 ,
     
{complex} Value|_to_set ) , SETTER FOR .[]



----------------------------------------------- 'rows & columns as vectors'

      

METHOD Rows|_get ( INT R|ow_index ) ==> {Cvector} , NEW



METHOD Set_row|_from_vector (
     
INT R|ow INDEXING {complex} ,
     
{Cvector} V|alue_row )



METHOD Columns|_get (
     
INT C|olumn INDEXING {complex} ) ==> {Cvector} , NEW



METHOD Set_column|_from_vector (
     
INT C|olumn_index ,
     
{Cvector} V|alue_column )



METHOD Clone|_of_matrix ==> {Cmatrix} , NEW



METHOD Eq|ual_matrix_to ( {Cmatrix} C|ompare_to ) ==> BOOL



-------------------------------------------------------------- 'arithmetic'

       

OPERATOR {Cmatrix} + {Cmatrix} ==> {Cmatrix} , NEW , OPERATORS



OPERATOR {Cmatrix} - {Cmatrix} ==> {Cmatrix} , NEW , OPERATORS



OPERATOR - {Cmatrix} ==> {Cmatrix} , NEW , OPERATORS



OPERATOR {Cmatrix} * REAL ==> {Cmatrix} , NEW , OPERATORS



OPERATOR {Cmatrix} * {complex} ==> {Cmatrix} , NEW , OPERATORS



OPERATOR REAL * {Cmatrix} ==> {Cmatrix} , NEW , OPERATORS



OPERATOR {complex} * {Cmatrix} ==> {Cmatrix} , NEW , OPERATORS



------------------------------------------------------- 'mult to {Cvector}'

  

OPERATOR {Cmatrix} * {Cvector} ==> {Cvector} , NEW , OPERATORS



OPERATOR {Cvector} * {Cmatrix} ==> {Cvector} , NEW , OPERATORS



------------------------------------------------------- 'multiply matrices'

 

OPERATOR {Cmatrix} * {Cmatrix} ==> {Cmatrix} , NEW , OPERATORS



------------------------------------------------------------- 'Determinant'

  

METHOD Det|erminant ==> {complex} , RECURSIVE , OPERATORS



FUNCTION neg_if_odd ( INT V|alue_checking ) ==> REAL



-------------------------------------------------------------- 'transposed'

 

METHOD Transpose ==> {Cmatrix} , NEW



---------------------------------------------------------- 'inverse matrix'

  

METHOD Inverse|_of_matrix ==> {Cmatrix} , NEW , OPERATORS



METHOD fill_minor (
     
{Cmatrix} M|inor_matrix ,
     
INT I|ndex_of_row_skip ,
     
INT J|ndex_of_column_skip )



------------------------------------------------------------------ 'as Str'

 

METHOD Str|ing_representation ==> STR


END