看看 顺便 翻译下注释的英文.要详细说明高斯-赛德尔迭代法的基本原理和算法.//'mat' is my actual matrix//size of 'variable' always =(column-1)//contains the solution set//counts number of iterations//performs a single iter
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/19 04:52:24
看看 顺便 翻译下注释的英文.要详细说明高斯-赛德尔迭代法的基本原理和算法.//'mat' is my actual matrix//size of 'variable' always =(column-1)//contains the solution set//counts number of iterations//performs a single iter
看看 顺便 翻译下注释的英文.
要详细说明高斯-赛德尔迭代法的基本原理和算法.
//'mat' is my actual matrix
//size of 'variable' always =(column-1)
//contains the solution set
//counts number of iterations
//performs a single iteration on all the equations
//the argument is the relaxation coefficient
//checks the allowable error
//small funtion for asking the user for the number of rows and columns
//prepares function for reduction
//solves by gauss-seigel method,
//perfomes multiple iterations until a solution is found
//the argument is the relaxation-coefficient,and this is "past" to 'iteration'
//prints the solution
//creates my matrix dynamically,but there are still no values in the positions
//rearranges the system so that it can be solved by gauss-seigel method
//must always rearange before solving
//'variable' will contain the solution set
//they will get initialized with the first guess in the 'solve' function
//all variables except the diagonal are being brought to the other side
//performes a single iteration on the system,using passed assumed values
//'last' is for the relaxation equation
//new value after relaxation
//DECLARATIONS AND INITIALIZATIONS
//initializes first guess
//this is the allowable error this value can be changed to suit the problem
//END OF DECLARATIONS AND INITIALIZATIONS
//MAIN BODY OF THE FUNCTION STARTS HERE-
//while('condition not met'){perform another iteration}
//this is the most important part,
//everything else in this loop is only to check that the criterion is met
//if(it has not met the criterion)
//then (return 1)=(condition not met) and the loop is repeated
//criterion has been met
//'solve' function must be executed before 'show_answer' function
//end of stream operators
//This Program solves linear systems by the Gauss-Seigel Method
//Try to input the matrix so that there is Diagonal Dominance
//Do you want to see the matrix?:(y/n)>;
//cRelaxation Coefficient(1=no relaxation)
//try another Relaxation Coefficient?:(y/n)
看看 顺便 翻译下注释的英文.要详细说明高斯-赛德尔迭代法的基本原理和算法.//'mat' is my actual matrix//size of 'variable' always =(column-1)//contains the solution set//counts number of iterations//performs a single iter
给我分!