正在加载图片...
85 Relaxation Methods Output( represents a space) For each o, there must be a set of outputs in the following format: The 1st line contains an and the corresponding number of iterations taken. In the c printf fprintf(outhila The c vinted as the following 注意:检查每个a时,先向下 Each找最大元,若非0则交换到对角线上; print 否则向上找最大元,若非0则 If the l 将该行加到第i行上 ix■has■ a□zero■cU If the method lax -v, print the e message Maximum■ number■o 、 ceded.ln” message“No■ convergence. In"out of the range|-27,2四1 print the If there is an entry ofx k) that is The outputs of two test cases must be seperated by a blank line.§5 Relaxation Methods Output ( represents a space) For each , there must be a set of outputs in the following format: • The 1 st line contains an  and the corresponding number of iterations taken. In the C printf: fprintf(outfile, "%4.2f%d\n", omega, iter_no ); The corresponding solution or error messages are to be printed as the following: • Each entry of the solution is to be printed as in the C fprintf: fprintf(outfile, "%12.8f\n", x ); • If the matrix A has a zero column, print the message “Matrixhas azerocolumn.Nouniquesolutionexists.\n”. • If the method fails to give a solution after N iterations, print the message “Maximumnumberofiterationsexceeded.\n”. • If there is an entry of that is out of the range [ −2 127 , 2 127 ], print the message “Noconvergence.\n”. The outputs of two test cases must be seperated by a blank line. (k ) x  注意:检查每个aii时,先向下 找最大元,若非0则交换到对角线上; 否则向上找最大元,若非0则 将该行加到第 i 行上
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有