合肥生活安徽新闻合肥交通合肥房产生活服务合肥教育合肥招聘合肥旅游文化艺术合肥美食合肥地图合肥社保合肥医院企业服务合肥法律

代写 Linear Equation System Solver

时间:2024-05-27  来源:合肥网hfw.cc  作者:hfw.cc 我要纠错



Programming Assignment 6: Linear Equation System Solver
This assignment is to design and implement a C++ project of matrices and vectors with class inheritance. The project has a basis class Matrix and two derived sub-classes class Vector and class SMatrix, representing vectors and square matrices as given in matrix.h, smatrix.h, and vector.h, respectively. Assume indices of rows and columns starting from 0. Create a project directory Assignment6_DXXXXXXX. Also, create a C++ project named assignment6_DXXXXXXX.dev to include header files matrix.h, smatrix.h, and vector.h and their implementation matrix.cpp, smatrix.cpp, and vector.cpp. Write an application program linear_equation_system_solver.cpp to implement a linear equation system solver. Place the project file, the header files, and the source code files in project directory Assignment6_DXXXXXXX.
A system of linear equations with n variables X0, X1, ..., and Xn-1 is a set of n linear equations:
a0,0X0 +a0,1 X1 +...+a0,n-2 Xn-2 +a0,n-1 Xn-1 =c0 a1,0X0 +a1,1 X1 +...+a1,n-2 Xn-2 +a1,n-1 Xn-1 =c1
...an-1,0 X0 + an-1,1 X1 + ... + an-1,n-2 Xn-1 + an-2,n-1 Xn-1 = cn-1
These n linear equations can be written as a matrix-vector equation AX=C, where A is the n × n coefficient matrix, X is the solution column vector of length n, and C is the constant column vector of length n, that
aa⋯aaXc a0,0 a0,1 ⋯ a0,n−2 a0,n−1 X0 c0
1,0 1,1 1,n−2 1,n−1 1 1 A= ⋮ ⋮ ⋱ ⋮ ⋮ ,X= ⋮ ,andC= ⋮ .
      an−2,0 an−2,1 ⋯ an−2,n−2 an−2,n−1 X cn−2 an−1,0 an−1,1 ⋯ an−1,n−2 an−1,n−1 Xn−2 cn−1
of the i-th column by vector C and 0 ≤ i < n. Theiapplication program should perform the following steps:
The solution of the linear equation system is Xi = A , where Ai is matrix A with replacement A
a. Input n as the rank of the linear equation system, 0 < n ≤ 10,
b. Randomly generate elements of coefficient matrix A and constant vector C. The
values of these elements are between 0 and 1.0.
c. Print the coefficient matrix A, constant vector C, and the system of linear equations.
d. Solve the linear equation system to obtain the result of solution vector X.
e. Print the solution of the linear equation system, i.e., the result of solution vector X.
f. Verify solution of the linear equation system, i.e., compute AX-C and check whether
it is the zero vector, error tolerance to six digits after the decimal point.
Compress directory Assignment6_DXXXXXXX to obtain the compressed file Assignment6_DXXXXXXX.YYY, where YYY is zip, rar, or 7z. Write a report Report6_DXXXXXXX.pdf to explain the experience of programming and development of this assignment. Submit Assignment6_DXXXXXXX.YYY and Report6_DXXXXXXX.pdf to iLearn. The assignment is due by 23:59 pm, Wednesday, May 29, 2024.
Program execution example:
请加QQ:99515681  邮箱:99515681@qq.com   WX:codinghelp













 

扫一扫在手机打开当前页
  • 上一篇:CS111 编程代做、代写 C++程序语言
  • 下一篇:入境菲律宾工作签证 在菲律宾如何办理工作签证
  • 无相关信息
    合肥生活资讯

    合肥图文信息
    新能源捕鱼一体电鱼竿好用吗
    新能源捕鱼一体电鱼竿好用吗
    海信罗马假日洗衣机亮相AWE  复古美学与现代科技完美结合
    海信罗马假日洗衣机亮相AWE 复古美学与现代
    合肥机场巴士4号线
    合肥机场巴士4号线
    合肥机场巴士3号线
    合肥机场巴士3号线
    合肥机场巴士2号线
    合肥机场巴士2号线
    合肥机场巴士1号线
    合肥机场巴士1号线
    合肥轨道交通线路图
    合肥轨道交通线路图
    合肥地铁5号线 运营时刻表
    合肥地铁5号线 运营时刻表
  • 币安app官网下载

    关于我们 | 打赏支持 | 广告服务 | 联系我们 | 网站地图 | 免责声明 | 帮助中心 | 友情链接 |

    Copyright © 2024 hfw.cc Inc. All Rights Reserved. 合肥网 版权所有
    ICP备06013414号-3 公安备 42010502001045