基于PyQt5的求解线性方程组软件的设计与实现  被引量:6

Design and Implementation of Software for Solving Linear Equations Based on PyQt5

在线阅读下载全文

作  者:卢玲 漆为民[1] LU Ling;QI Weimin(School of Artificial Intelligence,Jianghan University,Wuhan 430056,Hubei,China)

机构地区:[1]江汉大学人工智能学院,湖北武汉430056

出  处:《江汉大学学报(自然科学版)》2023年第1期18-27,共10页Journal of Jianghan University:Natural Science Edition

基  金:湖北省高等学校优秀中青年科技创新团队计划项目(T201828)。

摘  要:针对高维线性方程组人为求解较难且费时费力的问题,设计了一款基于PyQt5的线性方程组求解软件,可对用户输入的线性方程组使用Jacobi迭代法和Gauss-Seidel迭代法进行实时、高效的求解,使用幂法判断迭代方法的收敛性,并将迭代求解结果可视化。该软件使用文本控件展示两种迭代法的迭代结果,使用图表控件动态绘制两种迭代法所求的误差值随迭代次数的变化图及各个自变量的取值随迭代次数的变化图。软件的界面整体设计在Qt Designer中实现,局部界面的展示根据用户操作通过Python代码动态生成。界面逻辑功能使用Python的开发工具PyCharm进行开发,使用Python编写迭代算法代码,调用PyQt5库,操作界面。本软件可直观清晰地对比两种迭代法的迭代收敛情况,快速获得线性方程组的求解近似值,实时性好,界面简洁美观,用户操作简易,具有一定的实用价值。Aiming at the problem that high-dimensional linear equations are difficult and time-consuming to solve manually,this paper designed a linear equation-solving software based on PyQt5.This software solved linear equations input by users efficiently and in realtime based on Jacobi iteration and Gauss-Seidel iteration,judged the convergence of iterative methods using the power method,and visualized the iterative solution results.The text control was used to display the iterative results of the two iterative methods.The graph control was used to dynamically draw the graph of the error value obtained by the two iterative methods changing with the number of iterations and the graph of each independent variable value changing with the number of iterations.The overall interface design of this software was implemented in Qt Designer,and the partial interface display was dynamically generated by Python code according to user operations.The interface logic function was developed by Python′s development tool PyCharm,using Python to write iterative algorithm code,call the PyQt5 library,and operate the interface.This software can intuitively compare the two iterative methods′convergence and quickly obtain the approximate solution value of the linear equation system.It has good real-time performance,a simple and beautiful interface,user-friendly operation,and has certain practical value.

关 键 词:PyQt5 PYTHON 线性方程组 JACOBI迭代法 GAUSS-SEIDEL迭代法 幂法 

分 类 号:TP311.5[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象