'Transformation of elementary row two rows interchangeably Public Sub Matrix_Specify_Tow_Row_Exchange (Row_A_Index As Integer, Row_B_Index As Integer, temp_matrix () As Single) Dim i As IntegerFor i = 1 To UBound (temp_matrix, 2) swap temp_matrix (Row_A_Index, i), temp_matrix (Row_B_Index, i) Next iEnd Sub 'primary transformation after squaring a number from one row to another row was added up Public Sub Matrix_Single_Row_ShuChen_Addition_To_Other_Row (temp_matrix () As Single, Row_A_Index As Integer, Row_B_Index As Integer, k As Single) Dim i As IntegerFor i = 1 to Ubound (Temp_Matrix, 2) Temp_matrix (Row_B_INDEX, I) = Temp_matrix (Row_B_INDEX, I) K * TEMP_MATRIX (Row_a_index, i) Next Ind Sub 'The primary line of the primary line of the transformation of a number of PUBLIC SUB Matrix_single_row_shuchen (k as single, temp_a () as single, row_index as integer) DIM I as integer I = 1 to Ubound (Temp_a, 2) Temp_a (Row_index, I) = K * TEMP_A (Row_Index, i) Next Ind Sub
'Calculation of the simplest step array.
Option ExplicitPublic Function Matrix_Basic_Row_Transformation (temp_matrix () As Single) Dim Row_Index As Integer, col_index As Integer, Row_Num As Integer, Col_Num As Integer Dim i As Integer, j As Integer, Not_Zero_Row_Index As Integer Dim temp_chen As Dim flag As Boolean Row_Num Single = UBound (temp_matrix, 1) col_Num = UBound (temp_matrix, 2) row_Index = 1: col_index = 1 Do While (row_Index <= row_Num And col_index <= col_Num) 'Do While (col_index <= col_Num) flag = If_Specify_Col_Zero (temp_matrix, col_index, row_Index, Not_Zero_Row_Index) If (flag = False) Then 'FormTest.Print "did it!"' If col_index = 2 And row_Index = 2 Then output_matrix temp_matrix If (Not_Zero_Row_Index <> row_Index) Then Matrix_Specify_Tow_Row_Exchange row_Index, Not_Zero_Row_Index, temp_matrix End If 'FormTest .List1.additem row_index 'FormTest.List2.AddItem col_index For i = 1 To Row_Num If (i <> Row_Index) Then Matrix_Single_Row_ShuChen_Addition_To_Other_Row temp_matrix, Row_Index, i, -temp_matrix (i, col_index) / temp_matrix (Row_Index, col_index) End If' If Row_Index = 2 Then FormTest.List1.Additem Temp_matrix (i, col_num) Next i Matrix_Single_Row_Shuchen 1 / Temp_Matrix (Row_Index, Col_index), Temp_matrix, Row_index Row_index = Row_index